DedSec Security Research ·
Here is a hypothetical. A dynamic scan of a production web application behind a reverse proxy returns three results from its request-smuggling checks. The first, titled "HTTP request smuggling (CL.TE)" and rated critical, is on /search: the scanner sent a request carrying both Content-Length and Transfer-Encoding, the response took more than ten seconds, and the endpoint normally answers in a fraction of a second. The second, titled "Possible HTTP desync (TE.TE)" and rated medium, is on /login: a request with Transfer-Encoding: chunked got a 400, the same request with Transfer-Encoding: xchunked got a 501, and the scanner reported that the two spellings were handled differently. The third is the rest of the site, including the /assets/ paths, which the scanner reported clean.
The critical gets an incident channel. The medium is assigned to a developer. Nobody looks at the clean result. As in the earlier posts in this series, each call rests on the title and the rating rather than on what the scanner observed and what that observation can prove. A slow response shows that something waited, not which component or why. Two different error codes show that a component rejected two malformed requests for two different reasons. And a clean result from a check that never made two components disagree on a connection someone else shares says nothing about the one case, below, where we did get a real request answered with someone else's response.
This post is for whoever is holding a request-smuggling finding from a dynamic scan, or a clean result they are about to rely on. It covers how HTTP/1.1 decides where a request ends, the named variants, what an attacker gets from them, what six server stacks and an nginx front end did with twenty-six malformed requests, the one case where a second client received the wrong response, why timing and differential evidence are weak here, why confirming this on a production connection can hit a real user, the false positives and false negatives, the fix, and the static-analysis view. It is the twelfth post in a series about confirming DAST findings, after reflected XSS, SQL injection, OS command injection, Nuclei template matches, ffuf content discovery, path traversal, open redirect, SSRF through URL-fetch parameters, XXE, CRLF header injection and Host header injection. It overlaps the CRLF post, because response splitting is the response-side cousin of this bug, and the Host header post, because cache poisoning is one of the things a desync delivers.
Sources, and how each was checked. The measurements below were made on our test machine on 2 November 2026, on Ubuntu 24.04, inside a Linux network namespace with only a loopback interface, with every server running as a non-root user. We confirmed the isolation before each run: a lookup of the external name example.com failed. The software was Python 3.12.3 (Ubuntu package 3.12.3-1ubuntu0.17), whose http.server we ran with handlers we wrote; Node.js 22.22.2, whose core http module reports llhttp 9.3.0, once with defaults and once with its insecureHTTPParser option; Express 4.21.2 on that Node; uvicorn 0.54.0 with h11 0.16.0, running a plain ASGI application we wrote; and nginx 1.24.0, as an origin and as a reverse proxy in front of the others, over HTTP/1.1 and cleartext HTTP/2. Express, uvicorn and h11 were already installed and were used as found; we installed nothing. Every malformed request was sent as exact bytes from a raw socket, and every HTTP/2 request as hand-built frames, because a normal client would refuse to send them. Each backend echoed the method, path, the Content-Length and Transfer-Encoding headers it saw, and how many body bytes it read, so which length it used is read off the response rather than inferred. A separate upstream recorded the exact bytes nginx forwarded. RFC 9112 (HTTP/1.1 message syntax), RFC 9110 (HTTP semantics) and RFC 9113 (HTTP/2) are cited by section and paraphrased in our own words, because we had no copy on the machine to quote from. Nothing here about Apache httpd, HAProxy, Envoy, any CDN, any cloud load balancer, or end-to-end HTTP/2 was measured; where we say something about them, it is mechanism or general practice, and we say so. The opening scenario is hypothetical, and no number in this post measures any scanner, ours included.
HTTP/1.1 sends requests one after another on a TCP connection, with nothing between them. The only way a server knows where one request's body ends and the next request begins is the framing the request declares, and there are two ways to declare it.
A request that declares both is ambiguous, and that ambiguity is the bug class. RFC 9112 section 6.3, which orders the rules for working out a body's length, says that when both are present Transfer-Encoding overrides Content-Length, that such a message may be a smuggling attempt and ought to be handled as an error, and that an intermediary forwarding it must first remove the Content-Length. Section 6.1 lets a server either reject such a request or process it by Transfer-Encoding alone, and says that either way it must close the connection after responding. Closing is the important part: bytes the server did not consume as the body cannot then be read as anyone's next request.
The neighbouring rules are what the obfuscation variants probe. A request whose final transfer coding is not chunked must get a 400 and a closed connection (section 6.3), and so must an invalid Content-Length, including several values that disagree. RFC 9110 section 8.6 lets a recipient either reject a Content-Length made of identical repeated values, such as 42, 42, or treat it as one value. RFC 9112 says a server should answer 501 to a transfer coding it does not understand and must treat an HTTP/1.0 request carrying Transfer-Encoding as faulty framing (section 6.1); must reject whitespace between a header name and its colon with 400 (section 5.1); must reject a header folded onto a continuation line, the obsolete "obs-fold", or replace the fold with a space (section 5.2); and may accept a bare line feed as a line ending in the start line and headers (section 2.2). Each is a place where two implementations can make different, individually defensible choices.
None of this is dangerous on a connection that carries one client's requests to one server; the client can only confuse the server about its own requests. It becomes dangerous when a front end — a reverse proxy, load balancer or CDN edge — takes requests from many clients and sends them to a backend over a connection it reuses, because then the backend's idea of where one request ends decides where the next client's request begins.
The first half of each name is the front end's framing, the second the backend's.
xchunked, a tab or extra space before the value, a space before the colon, a folded value, chunked, identity, two Transfer-Encoding headers. The one that misses it falls back to Content-Length, and the pair becomes CL.TE or TE.CL.This section is mechanism; the measurements come after it. Each item starts from the same position: the attacker has left a prefix of their choosing at the front of the backend's view of the next request on a shared connection.
All five need a connection on which the attacker's bytes and someone else's request travel together.
The weakness is CWE-444, inconsistent interpretation of HTTP requests. The claim behind a finding has three parts that scanners often collapse into one:
The first alone is a parser observation, the second is a desync, and only the third shows impact on someone other than the tester. It is also the part that is dangerous to prove.
We sent twenty-six requests to each server, each on a fresh connection without Connection: close, so that bytes a server did not consume as the body would be read as a second request. The core payload was a POST whose body was 0\r\n\r\n followed by a complete GET /smuggled request, with a Content-Length covering all 47 bytes. A server framing by Content-Length read one 47-byte body and answered once; a server framing by Transfer-Encoding read an empty body and then answered GET /smuggled as a second request. The full output is in our lab notes; these are the results that matter for triage.
Python 3.12.3, http.server. This server does no body framing. It parses the request line and headers and hands the input stream to the handler, which decides how much to read. Our handler did what a minimal hand-written handler does: it read int(self.headers["Content-Length"]) bytes and ignored Transfer-Encoding. So every Content-Length and Transfer-Encoding combination, in any spelling, was framed by Content-Length, and the TE.CL payload (a chunked body with a 4-byte Content-Length) left the rest of the chunk on the connection, where it was answered as POST /smuggled. With two Content-Length headers, headers.get returned the first: 0 then 42 produced a second response, for /smuggled; 42 then 0 produced one. +42 was accepted by int as 42, and 42, 42 made int raise, closing the connection with no response. A chunked request with no Content-Length got an empty body, and the leftover 0 was parsed as a request line and answered with an HTML 400 page with no status line in front of it, after which the connection closed. A GET to our /static handler, which never read the body, left the 42-byte body on the connection, and it was answered as GET /smuggled: CL.0 on a single server. Every one of these was our handler's decision; the module's contribution is leaving the decision to the handler.
The same handlers under http.server's default protocol_version, HTTP/1.0, differed in one way that matters: the server closed the connection after every response, so leftover bytes were never read. The CL.0 request, the 0-then-42 duplicate and the TE.CL payload each got exactly one response. The framing mistakes were identical; closing the connection made them harmless.
Node.js 22.22.2, core http (llhttp 9.3.0), defaults. Node rejected with 400 and a closed connection every request carrying both headers: every spelling, both orders, the TE.CL payload and the HTTP/1.0 form. Mostly the logged reason was "Transfer-Encoding can't be present with Content-Length"; for two header-syntax variants (the space before the colon and the space-prefixed line after X-Pad) it was an invalid header token, so those failed on syntax first. It rejected every duplicate Content-Length, even two identical ones ("Duplicate Content-Length"), and 42, 42 and +42 ("Invalid character in Content-Length"). It rejected a bare line feed after the request line, so its handling of bare line feeds in headers was not reached, and it rejected them in chunk lines. A chunked request without Content-Length was framed correctly, and the GET /smuggled after it was answered as ordinary pipelining. A GET with a body got one response, but our handler read the body, so this does not show what Node does when a handler ignores one. Express 4.21.2 matched Node on every case, because Node does the parsing.
Node.js with insecureHTTPParser: true. One option on the server object made it a different server. It accepted both headers, framed by Transfer-Encoding and kept the connection open, so the core payload produced a second response, for /smuggled. That happened for plain chunked, the reversed order, a double space, a tab, CHUNKED, a folded value, identity, chunked, and two Transfer-Encoding headers ordered x then chunked. With a space before the colon, req.headers showed no Transfer-Encoding at all, yet the body was framed as chunked. With xchunked, chunked, identity, or chunked then x, it sent nothing within our 8-second limit and kept the connection open, consistent with reading the body until the connection closes, which we did not confirm from the source. A line starting with a space after an X-Pad header was folded into X-Pad, so that request was framed by Content-Length. It accepted bare line feeds in headers and after a chunk size, not in the zero-chunk line, and still rejected duplicate Content-Length.
uvicorn 0.54.0 with h11 0.16.0. uvicorn on h11 accepted both headers, framed by Transfer-Encoding, and kept the connection open: a second response, for /smuggled. That is the RFC's second option without the connection close the RFC requires after it. It did so for plain chunked, both orders, a double space, a tab, CHUNKED and a folded value, which h11 unfolded. On the TE.CL payload it read the whole 62-byte chunk and answered once. It rejected with 400 xchunked, chunked, identity, identity, chunked, two Transfer-Encoding headers in either order, and a space before the colon. The space-prefixed line after X-Pad was folded into X-Pad, so its Transfer-Encoding disappeared and the request was framed by Content-Length. Two different Content-Length values were rejected; two identical ones, and 42, 42, were merged into a single 42, the RFC 9110 option. +42 was rejected. The HTTP/1.0 request with both headers was framed by Transfer-Encoding and the connection closed. Bare line feeds were accepted in headers and rejected in chunk lines.
nginx 1.24.0 as the origin. nginx rejected every request with both headers with 400, logging that the client sent Content-Length and Transfer-Encoding at the same time. Codings it did not recognise got 501: xchunked, chunked, identity, identity, chunked and — the one surprise — a tab before chunked, which it logged as an unknown Transfer-Encoding beginning with the tab. RFC 9112 allows a tab there, so nginx is stricter than the grammar, and it fails closed. Two Transfer-Encoding headers, any duplicate Content-Length (identical or not), 42, 42, +42, a space before the colon, both folded forms, and HTTP/1.0 with Transfer-Encoding all got 400. A GET with a body to a return 200 location had its body discarded: one response. Bare line feeds were accepted in headers and in chunk lines, and the chunked body was framed correctly either way.
Read side by side: Node's defaults and nginx refused every ambiguity we sent. h11 resolved Content-Length plus Transfer-Encoding the way the RFC allows but kept the connection open, and accepted some spellings Node refused. And the components disagreed with each other in ways that would make the named variants if chained, which we did not do: a front end framing like our Python handler before a backend framing like h11 would be CL.TE on the core payload, the reverse would be TE.CL, lenient Node and h11 disagreed on identity, chunked, and any backend handler that ignores its body is CL.0 behind any front end that forwards one.
That only matters if a front end forwards the ambiguity. We put nginx in front of each backend in three shapes: its defaults, under which it speaks HTTP/1.0 upstream with Connection: close and a new connection per request; proxy_http_version 1.1 with an upstream keepalive pool, so backend connections are reused; and the same with proxy_request_buffering off. We sent all twenty-six requests through each, recorded the bytes nginx sent upstream, and after each sent a separate "victim" request, GET /victim, on a new client connection.
This is a negative result, and a useful one. nginx never forwarded an ambiguous request.
GET /smuggled after a chunked body arrived upstream as a separate, properly framed request, which is correct: the client had pipelined it on its own connection, and nginx answered it to that client./victim.Over HTTP/2 nginx did the same. A content-length smaller than the data, larger than it, or zero with data got 400. Buffered, nothing reached the upstream; with request buffering off, nginx had already sent the request line and headers, including the client's content-length, when it found the mismatch, and it closed that upstream connection without a body, so it could not be reused. A header value containing \r\n or a bare \n, and a header name containing : and \r\n, got 400 and a stream reset. The one place nginx departed from RFC 9113 was a transfer-encoding: chunked header on an HTTP/2 request, which section 8.2.2 calls malformed: nginx accepted it with a 200. But it did not forward the header. The upstream received 0\r\n\r\nGET /smuggled... as an opaque 47-byte body under nginx's own Content-Length: 47, or re-chunked as one 0x2f-byte chunk with buffering off. Nothing was smuggled.
So, for nginx 1.24.0 in these configurations, H2.CL, H2.TE, CL.TE, TE.CL, TE.TE and duplicate Content-Length all stopped at the front end. That measures one version of one proxy with the configurations we wrote, and nothing else.
A correct front end was not enough. One of the six requests nginx accepted was a GET to /static with a body, and nginx forwarded it as RFC 9112 permits: a GET with a Content-Length and the body. The Python /static handler never read the body. On the reused upstream connection, those bytes became the start of the backend's next request.
In the first run, the leftover was GET /smuggled (42 bytes), which the backend answered at once. nginx logged "upstream sent more data than specified in "Content-Length" header while reading upstream", and the victim got its own response: the extra response arrived while nginx was still reading the first, and it did not reuse the connection.
Then we made the smuggled request slow. The leftover became GET /slow-smuggled (47 bytes), a path our handler answers after four seconds. The attacker's GET /static was answered normally, and nginx returned the upstream connection to its pool looking idle, with the backend busy on the smuggled request. One second later, a victim on a separate client connection sent GET /victim1. nginx sent it on the pooled connection and returned the first response it read, three seconds later. The victim asked for /victim1 and received the response to /slow-smuggled. The next two victims got their own responses. In our run the misalignment lasted one request; we did not establish from nginx's source why it stopped there, and a backend with different timing might behave differently. nginx's access log recorded GET /victim1 as a 200, and its error log at the info level had nothing about it. The only trace was a response size that did not match what /victim1 returns.
The controls isolate the cause. With nginx's defaults — HTTP/1.0 upstream, a new connection per request — all three victims got their own responses, because the connection holding the leftover was closed. With uvicorn as the backend and keepalive on, the victims were unaffected, because h11 framed the 47 bytes as a body and our application read them. It took all three: a backend handler that ignored a body, a front end that forwarded the body as the RFC permits, and upstream connection reuse.
Two lessons for triage. A front end that normalises framing protects against ambiguity, not against a backend that declines to read what was framed correctly. And the condition we had to create to see it — a smuggled request slow enough that nginx considered the connection idle — is the kind of condition a single-shot scanner check does not create.
Timing shows that something waited, not what. The usual detection is a request that a vulnerable backend will wait on — for example a CL.TE probe whose Content-Length makes the front end forward only part of a chunked body, so a chunk-reading backend waits for the rest — with a timeout as the signal. We measured four probes on each server, directly and through nginx, with a 6-second limit.
return 200 does not wait for the body.1\r\nZ\r\n: uvicorn waited for another chunk, Python answered at once by Content-Length, and Node and nginx answered 400 at once.Through nginx, the first two probes waited past the limit in front of every backend, including Python, which answered both instantly when reached directly. nginx, with its default request buffering, buffers request bodies before forwarding, so nginx was the one waiting. The third probe got an immediate 400 from nginx in front of every backend, including uvicorn, which hung on it directly. A timeout through a front end shows that some component on the path waited for bytes. It does not show which one, whether the backend saw the request, or whether the endpoint is simply slow. It is worth something only when the same request without the ambiguity returns quickly, the difference repeats, and the variant that should not hang does not.
A differential can be two rejections. nginx answered 400 to chunked with a Content-Length and 501 to xchunked with a Content-Length. That is what a TE.TE check looks for, and both mean the request was refused before it reached anything.
Two responses on one connection is usually pipelining. Sent directly, a payload that gets two responses shows how one server framed it. The bytes, the connection and the second response all belong to the tester; Node, uvicorn and nginx gave two responses to a plain chunked body, correctly.
A single-connection test cannot see the third part of the claim. The impact lands on another client's connection, so a test has to send its follow-up on a separate connection and hope the front end puts it on the same upstream connection. Our lab had one nginx worker and one backend and, as the capture showed, every request used the same pooled connection. Production may have many front-end processes, many backends and a pool per process, so the follow-up usually lands elsewhere, and a scanner that tries once and gets its own correct response reports clean. The CL.0 case also needed timing that a simple check would not arrange.
Confirming it in production is an attack on whoever is next. Bytes a successful probe leaves on a shared upstream connection are read as the start of the next request on it, and in production that is probably a real user's request. In our lab it was the victim. The follow-up only has to lose the race once for a real user to get a response meant for the tester, or to have the tester's prefix glued onto their request.
And the false negatives, which matter more because they produce a clean result:
The procedure below is general practice. Confirmation here can harm users who are not part of the test, so work in a staging environment that mirrors production's proxy chain where possible, and in production only with explicit permission, at low traffic, and with these safeguards.
All of this is general practice except where it says it was measured.
insecureHTTPParser turned Node from refusing every ambiguity into accepting most of them.return discarded an unread GET body itself; our Node and uvicorn handlers read their bodies, so we did not test whether those servers drain a body a handler ignores. Check it for your framework.Taint analysis does not model this class well, because there is no source-to-sink flow in application code; the behaviour lives in parser defaults and proxy configuration. What static analysis can usefully flag is the small set of code and configuration that turns it on: a Node server created with insecureHTTPParser: true or started with --insecure-http-parser; a BaseHTTPRequestHandler subclass that sets protocol_version = "HTTP/1.1" with handlers that never read rfile; a hand-written HTTP parser; and upstream keepalive in front of a backend known to be lenient. Each is a configuration finding, and each needs the deployed chain to tell whether it matters. The SAST false positives post covers rules that fire on a pattern without the context that decides reachability; a rule that flagged every proxy_http_version 1.1 would be one.
A confirmed DAST finding tells you that a deployed chain framed a request two ways and someone else's request was affected. A static finding tells you which line or setting made a component lenient. Neither alone tells you whether the component it is paired with in production disagrees with it.
In the scenario, the critical CL.TE on /search was the front end waiting. The probe's body was incomplete by design and the reverse proxy buffered request bodies, so it waited for the rest; the backend never saw the request. A control with the same incomplete body and no Transfer-Encoding took exactly as long, and the same probe with a complete body got a 400 from the proxy. It was closed for this class with both timings attached.
In the scenario, the medium TE.TE on /login was two rejections: the 400 was the proxy refusing both headers together, and the 501 was the proxy refusing a coding it did not know. Neither request reached the application. It was closed with the proxy's error-log lines.
In the scenario, the clean result was the false negative. The /assets/ paths were served by a small handler that returned files and never read a request body, behind a proxy with upstream keepalive. In staging, with production's proxy configuration, a GET to an asset carrying a short body that was a request for a nonexistent path, followed immediately by a request from a second connection, delivered the nonexistent path's 404 to the second connection on the third attempt. It was rated high, fixed by draining the body in the handler and rejecting bodies on GET to those paths at the proxy, and retested with the same sequence and more attempts.
AppSecD's dynamic and API testing runs Nuclei, Dalfox, SQLMap, Commix, Katana, Arjun, FFuf and Interactsh for out-of-band detection, plus 150+ native checks and API discovery across 50+ web frameworks. In its lifecycle this is the runtime stage: DAST and API testing run against the deployed application, because code review cannot see a problem that only appears once the application is assembled and running. Its static analysis includes dataflow taint analysis that traces source to sink across functions. Its AI layer labels likely false positives, with the label itself tracked, and assembles attack chains across findings, showing how separately unremarkable issues combine. Its findings are deduplicated across scans and tracked through new, reopened and fixed states, and they need maker-checker approval to close, so a finding cannot be closed unilaterally.
That is the whole claim, and data/products.ts, the single source of truth for what these products do, does not mention request smuggling, desync, Content-Length, Transfer-Encoding or HTTP/2 at all. So this post does not claim that AppSecD has a request-smuggling or desync check, which variants it would send (CL.TE, TE.CL, TE.TE, duplicate Content-Length, CL.0, H2.CL or H2.TE), whether it can send malformed HTTP/1.1 bytes or malformed HTTP/2 frames, whether it uses timing probes or follow-up requests on separate connections, what safeguards it would apply against affecting other users' connections, whether it distinguishes a 400, a 501 or a front end waiting for its own body from a finding, how it rates such a finding, whether its static or configuration rules flag lenient parser settings or proxy keepalive, whether its attack-chain assembly links a desync to cache poisoning or an access-control bypass, or how accurate any such detection would be. The measurements, the confirmation procedure, the fixes and the checklist above are general practice, not a description of how AppSecD works internally, and they apply to any scanner's output, ours included. The scenario in this post is hypothetical and does not describe any AppSecD deployment, user or finding.