{"id":"CVE-2025-43859","kind":"vulnerability","aliases":["CVE-2025-43859","GHSA-vqfr-h8mv-ghfj"],"related":[],"title":"h11 accepts some malformed Chunked-Encoding bodies","description":"### Impact\n\nA leniency in h11's parsing of line terminators in chunked-coding message bodies can lead to request smuggling vulnerabilities under certain conditions.\n\n### Details\n\nHTTP/1.1 Chunked-Encoding bodies are formatted as a sequence of \"chunks\", each of which consists of:\n\n- chunk length\n- `\\r\\n`\n- `length` bytes of content\n- `\\r\\n`\n\nIn versions of h11 up to 0.14.0, h11 instead parsed them as:\n\n- chunk length\n- `\\r\\n`\n- `length` bytes of content\n- any two bytes\n\ni.e. it did not validate that the trailing `\\r\\n` bytes were correct, and if you put 2 bytes of garbage there it would be accepted, instead of correctly rejecting the body as malformed.\n\nBy itself this is harmless. However, suppose you have a proxy or reverse-proxy that tries to analyze HTTP requests, and your proxy has a _different_ bug in parsing Chunked-Encoding, acting as if the format is:\n\n- chunk length\n- `\\r\\n`\n- `length` bytes of content\n- more bytes of content, as many as it takes until you find a `\\r\\n`\n\nFor example, [pound](https://github.com/graygnuorg/pound/pull/43) had this bug -- it can happen if an implementer uses a generic \"read until end of line\" helper to consumes the trailing `\\r\\n`.\n\nIn this case, h11 and your proxy may both accept the same stream of bytes, but interpret them differently. For example, consider the following HTTP request(s) (assume all line breaks are `\\r\\n`):\n\n```\nGET /one HTTP/1.1\nHost: localhost\nTransfer-Encoding: chunked\n\n5\nAAAAAXX2\n45\n0\n\nGET /two HTTP/1.1\nHost: localhost\nTransfer-Encoding: chunked\n\n0\n```\n\nHere h11 will interpret it as two requests, one with body `AAAAA45` and one with an empty body, while our hypothetical buggy proxy will interpret it as a single request, with body `AAAAXX20\\r\\n\\r\\nGET /two ...`. And any time two HTTP processors both accept the same string of bytes but interpret them differently, you have the conditions for a \"request smuggling\" attack. For example, if `/two` is a dangerous endpoint and the job of the reverse proxy is to stop requests from getting there, then an attacker could use a bytestream like the above to circumvent this protection.\n\nEven worse, if our buggy reverse proxy receives two requests from different users:\n\n```\nGET /one HTTP/1.1\nHost: localhost\nTransfer-Encoding: chunked\n\n5\nAAAAAXX999\n0\n```\n\n```\nGET /two HTTP/1.1\nHost: localhost\nCookie: SESSION_KEY=abcdef...\n```\n\n...it will consider the first request to be complete and valid, and send both on to the h11-based web server over the same socket. The server will then see the two concatenated requests, and interpret them as _one_ request to `/one` whose body includes `/two`'s session key, potentially allowing one user to steal another's credentials.\n\n### Patches\n\nFixed in h11 0.15.0.\n\n### Workarounds\n\nSince exploitation requires the combination of buggy h11 with a buggy (reverse) proxy, fixing either component is sufficient to mitigate this issue.\n\n### Credits\n\nReported by Jeppe Bonde Weikop on 2025-01-09.","summary":"The h11 Python HTTP/1.1 library accepts malformed chunked-encoding bodies, skipping validation of the trailing CRLF after each chunk. When paired with a reverse proxy that parses chunked bodies differently, an attacker can smuggle a second request past the proxy and steal another user's session cookie or bypass access controls.","severity":"critical","cvss":9.1,"epss":0.00594,"exploited":false,"exploited_at":null,"products":[{"name":"h11","fixed":["0.16.0"],"affected":"< 0.16.0","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["cwe-444","httpcore","package","python","reverse-proxy","self-hosted","uvicorn"],"not_affected_if":["h11-0.16-or-later","managed-hosting","no-reverse-proxy"],"how_to_check":"- Run `pip show h11` or `pip freeze | grep -i h11` and check whether the version is below `0.16.0`\n- Check whether h11 is used behind a reverse proxy (nginx, HAProxy, Pound, a cloud load balancer) that forwards chunked requests to an h11-based server such as uvicorn or httpcore\n- Review the proxy's chunked-encoding parser for the same flaw described in the advisory","fix":"- Upgrade h11 to `0.16.0` or later (the advisory says fixed in `0.15.0`; the affected range in the source is below `0.16.0`)\n- Alternatively, fix or harden the reverse proxy's chunked parsing so it rejects bodies with malformed chunk terminators","status":"open","published_at":"2025-04-24T16:07:56+00:00","first_seen_at":"2026-10-27T16:35:55+00:00","triaged_at":"2026-10-27T16:38:08+00:00","updated_at":"2026-10-27T16:38:08+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-27T16:38:08Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade h11 to `0.16.0` or later (the advisory says fixed in `0.15.0`; the affected range in the source is below `0.16.0`)\n- Alternatively, fix or harden the reverse proxy's chunked parsing so it rejects bodies with malformed chunk terminators","reach":"internet","title":"h11: lenient chunked-body parsing enables request smuggling behind proxies","impact":"high","summary":"The h11 Python HTTP/1.1 library accepts malformed chunked-encoding bodies, skipping validation of the trailing CRLF after each chunk. When paired with a reverse proxy that parses chunked bodies differently, an attacker can smuggle a second request past the proxy and steal another user's session cookie or bypass access controls.","category":"package","nicknames":[],"who_cares":["python","self-hosted","reverse-proxy","uvicorn","httpcore"],"confidence":0.8,"needs_auth":"no","worst_case":"Attacker smuggles requests and steals other users' session cookies","analyst_note":"","how_to_check":"- Run `pip show h11` or `pip freeze | grep -i h11` and check whether the version is below `0.16.0`\n- Check whether h11 is used behind a reverse proxy (nginx, HAProxy, Pound, a cloud load balancer) that forwards chunked requests to an h11-based server such as uvicorn or httpcore\n- Review the proxy's chunked-encoding parser for the same flaw described in the advisory","needs_analyst":false,"not_affected_if":["no-reverse-proxy","managed-hosting","h11-0.16-or-later"],"who_is_affected":"Applications running h11 at or below 0.14.0 (the advisory's affected range) are exposed, most commonly through servers or clients that depend on h11, such as uvicorn and httpcore. The risk needs a buggy proxy in front of the h11 service that disagrees on chunk boundaries, so a directly exposed h11 server with no such proxy is less at risk. Teams running only managed load balancers that normalize request bodies can rate the risk lower, but should still upgrade.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000824,"input_tokens":4398,"output_tokens":768,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-01':573C '-09':574C '-2025':10A,18A '-43859':11A,19A '-444':22B '/graygnuorg/pound/pull/43)':262C '/one':322C,458C,520C '/two':335C,381C,411C,470C,524C '0':333C,343C,468C '0.14.0':144C '0.15.0':541C '2':178C '2025':572C '45':332C '5':330C,466C 'aaaaa45':355C 'aaaaaxx2':331C 'aaaaaxx999':467C 'aaaaxx20':376C 'abcdef':477C 'accept':2A,38B,186C,296C,389C 'access':83B 'act':228C 'allow':529C 'analyz':213C 'anoth':76B,534C 'assum':314C 'attack':65B,407C,432C 'base':497C 'bodi':8A,43B,62B,100C,115C,192C,354C,361C,375C,522C 'bond':569C 'break':317C 'bug':222C,265C 'buggi':365C,448C,549C,553C 'bypass':82B 'byte':133C,155C,160C,171C,179C,239C,243C,301C,394C 'bytestream':436C 'case':289C 'certain':108C 'chunk':6A,41B,52B,61B,97C,113C,122C,128C,150C,226C,234C,329C,342C,465C 'chunked-cod':96C 'chunked-encod':5A,40B,112C,225C 'circumv':441C 'code':98C 'combin':547C 'complet':486C 'compon':558C 'concaten':511C 'condit':109C,402C 'consid':308C,480C 'consist':126C 'consum':282C 'content':135C,157C,241C,245C 'control':84B 'cooki':80B,474C 'correct':173C,189C 'could':433C 'credenti':536C 'credit':565C 'crlf':49B 'cve':9A,17A 'cwe':21B 'danger':414C 'detail':110C 'differ':63B,221C,305C,398C,455C 'either':557C 'empti':360C 'encod':7A,42B,114C,227C,328C,341C,464C 'end':277C 'endpoint':415C 'even':444C 'exampl':258C,307C,409C 'exploit':544C 'find':253C 'first':482C 'fix':538C,556C 'follow':310C 'format':117C,232C 'garbag':181C 'generic':274C 'get':321C,334C,428C,457C,469C 'ghfj':16A 'ghsa':13A 'ghsa-vqfr-h8mv-ghfj':12A 'github.com':261C 'github.com/graygnuorg/pound/pull/43)':260C 'h11':1A,20A,34B,89C,141C,145C,290C,345C,496C,540C,550C 'h11-based':495C 'h8mv':15A 'happen':268C 'harmless':199C 'helper':280C 'host':31B,324C,337C,460C,472C 'howev':200C 'http':214C,311C,386C 'http/1.1':36B,111C,323C,336C,459C,471C 'httpcore':23B 'hypothet':364C 'i.e':161C 'impact':85C 'implement':271C 'includ':523C 'instead':146C,187C 'interpret':303C,347C,368C,396C,514C 'issu':564C 'jepp':568C 'job':418C 'key':476C,527C 'lead':102C 'length':129C,132C,151C,154C,235C,238C 'lenienc':87C 'librari':37B 'like':437C 'line':93C,279C,316C 'localhost':325C,338C,461C,473C 'malform':4A,39B,194C 'mani':247C 'may':294C 'messag':99C 'mitig':562C 'n':131C,137C,153C,170C,237C,256C,286C,320C,378C 'nget':380C 'one':352C,357C,517C,530C 'packag':24B 'pair':54B 'pars':60B,91C,147C,224C 'past':71B 'patch':537C 'potenti':528C 'pound':259C 'processor':387C 'protect':443C 'proxi':28B,58B,73B,205C,209C,218C,293C,366C,422C,450C,555C 'put':177C 'python':25B,35B 'r':130C,136C,152C,169C,236C,255C,285C,319C,377C,379C 'read':275C 'receiv':451C 'reject':190C 'report':566C 'request':70B,104C,215C,312C,351C,373C,405C,426C,453C,483C,512C,518C 'requir':545C 'revers':27B,57B,208C,421C,449C,554C 'reverse-proxi':26B,207C 'second':69B 'see':508C 'self':30B 'self-host':29B 'send':490C 'sequenc':120C 'server':499C,505C 'session':79B,475C,526C 'sinc':543C 'singl':372C 'skip':44B 'smuggl':67B,105C,406C 'socket':503C 'steal':75B,533C 'stop':425C 'stream':299C 'string':392C 'suffici':560C 'suppos':201C 'take':250C 'termin':94C 'time':384C 'trail':48B,168C,284C 'transfer':327C,340C,463C 'transfer-encod':326C,339C,462C 'tri':211C 'two':159C,350C,385C,452C,510C 'use':272C,434C 'user':77B,456C,531C 'uvicorn':32B 'valid':45B,165C,488C 'version':139C 'vqfr':14A 'vulner':106C 'web':498C 'weikop':570C 'whose':521C 'workaround':542C 'wors':445C 'would':184C","nicknames":[],"mitigations":[],"who_affected":"Applications running h11 at or below 0.14.0 (the advisory's affected range) are exposed, most commonly through servers or clients that depend on h11, such as uvicorn and httpcore. The risk needs a buggy proxy in front of the h11 service that disagrees on chunk boundaries, so a directly exposed h11 server with no such proxy is less at risk. Teams running only managed load balancers that normalize request bodies can rate the risk lower, but should still upgrade.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2025-04-24T16:07:56+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-vqfr-h8mv-ghfj","url":"https://github.com/advisories/GHSA-vqfr-h8mv-ghfj","severity":"critical","published_at":"2025-04-24T16:07:56+00:00","modified_at":"2026-10-27T16:31:16+00:00","first_seen_at":"2026-10-27T16:35:55+00:00","fetched_at":"2026-10-27T16:35:55+00:00","note":null},{"source":"nvd","external_id":"CVE-2025-43859","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-43859","severity":null,"published_at":"2025-04-24T19:15:47+00:00","modified_at":"2026-06-17T09:24:39+00:00","first_seen_at":"2026-10-27T17:03:04+00:00","fetched_at":"2026-10-27T17:03:04+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}