CVE-2025-43859: h11 accepts some malformed Chunked-Encoding bodies

Published Apr 24, 2025
·
Updated

Impact

A leniency in h11's parsing of line terminators in chunked-coding message bodies can lead to request smuggling vulnerabilities under certain conditions.

Details

HTTP/1.1 Chunked-Encoding bodies are formatted as a sequence of "chunks", each of which consists of:

- chunk length - \r\n - length bytes of content - \r\n

In versions of h11 up to 0.14.0, h11 instead parsed them as:

- chunk length - \r\n - length bytes of content - any two bytes

i.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.

By 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:

- chunk length - \r\n - length bytes of content - more bytes of content, as many as it takes until you find a \r\n

For example, pound had this bug -- it can happen if an implementer uses a generic "read until end of line" helper to consumes the trailing \r\n.

In 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):

GET /one HTTP/1.1 Host: localhost Transfer-Encoding: chunked

5 AAAAAXX2 45 0

GET /two HTTP/1.1 Host: localhost Transfer-Encoding: chunked

0

Here 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.

Even worse, if our buggy reverse proxy receives two requests from different users:

GET /one HTTP/1.1 Host: localhost Transfer-Encoding: chunked

5 AAAAAXX999 0

GET /two HTTP/1.1 Host: localhost Cookie: SESSIONKEY=abcdef...

...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.

Patches

Fixed in h11 0.15.0.

Workarounds

Since exploitation requires the combination of buggy h11 with a buggy (reverse) proxy, fixing either component is sufficient to mitigate this issue.

Credits

Reported by Jeppe Bonde Weikop on 2025-01-09.

Other sources

h11 is a Python implementation of HTTP/1.1. Prior to version 0.16.0, a leniency in h11's parsing of line terminators in chunked-coding message bodies can lead to request smuggling vulnerabilities under certain conditions. This issue has been patched in version 0.16.0. Since exploitation requires the combination of buggy h11 with a buggy (reverse) proxy, fixing either component is sufficient to mitigate this issue.

MITRE

Affected Software

3 affected componentsFixes available
pip/h11<0.16.0
0.16.0
debian/python-h11<=0.14.0-1
0.12.0-10.14.0-1.1
IBM Concert Software<=1.0.0-1.1.0

Event History

Apr 24, 2025
Advisory Published
via GitHub·04:07 PM
CVE Published
via MITRE·06:15 PM
Data Sourced
via MITRE·06:15 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·07:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·07:15 PM
DescriptionSeverityWeakness
May 12, 2025
Data Sourced
via Ubuntu·06:26 PM
RemedyDescriptionSeverityAffected Software
Sep 1, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-43859?

CVE-2025-43859 has a medium severity due to its potential for enabling request smuggling attacks.

2

How do I fix CVE-2025-43859?

To fix CVE-2025-43859, upgrade the h11 package to version 0.16.0 or later.

3

What software is affected by CVE-2025-43859?

CVE-2025-43859 affects versions of the h11 package below 0.16.0.

4

What are the implications of CVE-2025-43859?

CVE-2025-43859 can lead to request smuggling vulnerabilities that may compromise the security of applications.

5

When was CVE-2025-43859 disclosed?

CVE-2025-43859 was disclosed in 2025.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203