
Verifica hosts nginx em busca de CVE-2026-123007 (underflow de inteiro no controle de fluxo HTTP/2) por meio de fingerprinting passivo de versão/SETTINGS e de uma sonda oracle não destrutiva.
Scanner de vulnerabilidades para CVE-2026-123007 — um RCE crítico não autenticado no nginx por meio de um underflow de inteiro em HTTP/2 (overcredit de controle de fluxo).
Escrito por 0xNRG
A implementação HTTP/2 do nginx trata incorretamente o crédito de controle de fluxo quando streams são reiniciadas via um overflow de SETTINGS. O caminho de limpeza devolve o crédito pendente de DATA à janela de conexão sem impor o máximo de 31 bits do HTTP/2, deixando a janela sem sinal acima de 0x7FFFFFFF. Uma verificação de limites subsequente em WINDOW_UPDATE avalia MAX - current com aritmética sem sinal, sofre underflow e aceita aproximadamente 2³³ incrementos adicionais. Com iterações suficientes, a janela de conexão dá a volta através de seu ponto médio com sinal, o nginx constrói um buffer de saída invertido e passa um size_t negativo para memcpy, expondo memória do heap e da libc e permitindo RCE não autenticado.
Afetado: nginx 1.9.5 – 1.31.8 (todas as builds). Explorável confirmado: 1.31.6, 1.31.8.
Corrigido: nginx 1.31.9 (mainline) e 1.30.7 (stable), lançados em 18 de novembro de 2026.
Pré-requisito: http2 on; deve estar ativo no listener.
Dois modos, ambos não destrutivos:
Apenas verificações passivas — nenhum estado do servidor é modificado.
| Verificação | O que detecta |
|---|---|
| HTTPS + TLS 1.3 | O alvo está acessível |
| HTTP/2 ALPN | h2 negociado — pré-requisito do exploit |
Cabeçalho Server: | Versão do nginx via requisição HEAD HTTP/1.1 |
| SETTINGS HTTP/2 | Correspondência exata com perfis vulneráveis conhecidos |
Retorna VULNERABLE_CONFIRMED em correspondência exata de versão + SETTINGS, LIKELY_VULNERABLE em correspondência de faixa de versão, NOT_VULNERABLE quando HTTP/2 está ausente.
--probe)Dispara o erro real de contabilização de controle de fluxo e o verifica por meio de dois oracles independentes observáveis na rede, e então para imediatamente. O estágio de amplificação de crash nunca é iniciado — os workers do nginx do alvo permanecem intactos.
Oracle 1 — as streams 149 e 151 devem ser reiniciadas com FLOW_CONTROL_ERROR e o corpo da resposta Range deve corresponder.
Oracle 2 — um PING ACK deve ser recebido na conexão agora com overcredit, provando que a guarda com underflow aceitou um segundo incremento de MAX.
Modo fingerprint — qualquer SO, Python 3.8+, sem pacotes extras.
Modo sonda oracle — Linux x86-64, CPython 3.10 de 64 bits, runtime OpenSSL 3 (libssl.so.3).
# Verify probe prerequisites
python3.10 -c "
import ctypes, ssl, sys
print('cpython:', sys.implementation.name == 'cpython')
print('3.10: ', sys.version_info[:2] == (3, 10))
print('64-bit: ', ctypes.sizeof(ctypes.c_void_p) == 8)
print('ossl3: ', ssl.OPENSSL_VERSION_INFO[0] == 3, ssl.OPENSSL_VERSION)
"
# Single target
python3 nginx2root-scanner.py <target>
# With full URL or custom port
python3 nginx2root-scanner.py https://10.0.0.5:8443/
# Bulk scan from file (one host per line, # comments ignored)
python3 nginx2root-scanner.py --file hosts.txt
# Scan multiple ports per host
python3 nginx2root-scanner.py --file hosts.txt --ports 443,8443,4443
# Control parallelism and timeout (defaults: 50 workers, 3s)
python3 nginx2root-scanner.py --file hosts.txt --workers 100 --timeout 5
# Machine-readable JSON output
python3 nginx2root-scanner.py 10.0.0.5 --json
# Oracle probe — confirms vulnerability without crashing the target
# (Linux + CPython 3.10 + OpenSSL 3 required)
python3.10 nginx2root-scanner.py 10.0.0.5 --probe
| Flag | Padrão | Descrição |
|---|---|---|
target | — | Alvo único: URL, IP ou FQDN |
--file, -f | — | Arquivo com um alvo por linha |
--ports | 443 | Portas HTTPS separadas por vírgula a tentar por host |
--workers | 50 | Workers paralelos (modo em massa) |
--timeout | 3 | Timeout por conexão em segundos |
--probe | desativado | Executa sonda oracle não destrutiva |
--json | desativado | Saída JSON em vez de legível por humanos |
Códigos de saída: 0 = não vulnerável / inconclusivo · 1 = vulnerável · 2 = erro
Alvo vulnerável (correspondência de fingerprint):
CVE-2026-123007 — nginx2root scanner
Written by 0xNRG
Target : 127.0.0.1:19443
────────────────────────────────────────────────────────────────
HTTPS reachable : yes
HTTP/2 (h2 ALPN) : yes
Server header : nginx/1.31.8
HTTP/2 SETTINGS : [3,128], [4,65536], [5,16777215], [9,1]
Profile match : nginx/1.31.8
────────────────────────────────────────────────────────────────
· HTTP/2 negotiated via ALPN h2
· Server header 'nginx/1.31.8' and HTTP/2 SETTINGS exactly match
validated vulnerable profile 'nginx/1.31.8'
────────────────────────────────────────────────────────────────
[!!!] VULNERABLE (confidence: high)
Não vulnerável (HTTP/2 desativado):
CVE-2026-123007 — nginx2root scanner
Written by 0xNRG
Target : example.com:443
────────────────────────────────────────────────────────────────
HTTPS reachable : yes
HTTP/2 (h2 ALPN) : no
Server header : nginx/1.31.8
HTTP/2 SETTINGS : —
Profile match : none
────────────────────────────────────────────────────────────────
· HTTP/2 not negotiated — prerequisite for CVE-2026-123007 is absent
────────────────────────────────────────────────────────────────
[OK] NOT VULNERABLE (confidence: high)
Sonda Oracle confirmada:
Oracle probe : CONFIRMED VULNERABLE
· TLS connected: TLSv1.3 ALPN=h2
· Trigger flight assembled (7 MiB + 262 144 KeyUpdates); sending…
· Oracle 1 PASSED — streams 149/151 reset FLOW_CONTROL_ERROR;
10-byte Range release matches public body prefix
· Oracle 2 PASSED — PING ACK received on overcredited connection
(underflowed WINDOW_UPDATE guard accepted additional MAX increment)
· VULNERABILITY CONFIRMED: cleanup overcredit observable on this target
────────────────────────────────────────────────────────────────
SUMMARY
────────────────────────────────────────────────────────────────
Hosts scanned : 523
Ports per host : 3 (443, 8443, 4443)
Total probes : 1569
Workers / timeout : 50 / 3.0s
────────────────────────────────────────────────────────────────
[OK] NOT VULNERABLE 12
[?] INCONCLUSIVE 1
[!] ERROR 1556
────────────────────────────────────────────────────────────────
Servers detected:
nginx/1.31.8 10
Kestrel 2
Microsoft-IIS/10.0 1
────────────────────────────────────────────────────────────────
HTTP/2 enabled (require manual review):
· example.com:443
────────────────────────────────────────────────────────────────
http2 on; da sua configuração do nginx.Esta ferramenta destina-se a testes de segurança autorizados em sistemas que você possui ou para os quais tem permissão escrita explícita para testar. Não a utilize contra sistemas sem autorização.