Urllib3
urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory
urllib3 is an HTTP client library for Python. From 1.10.3 until 2.8.0, the HTTPResponse.read_chunked and HTTPResponse.stream methods can allocate unbounded memory because the streaming chunk parser buffers the chunk-size field until newline or EOF without a length bound. The trigger is that a malicious server returns Transfer-Encoding: chunked followed by a very long run of bytes without a newline. The attack mechanism is that a malicious HTTP server sends a very long unterminated chunk-size line. The impact is that unbounded memory allocation can exhaust the client process. This issue is fixed in version 2.8.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.10.3, < 2.8.0
Fixed in 2.8.0
Mitigation
Upgrade urllib3 to 2.8.0 or later.
References
- Vendor advisory github.com/urllib3/urllib3/security/advisories…
- Patch github.com/urllib3/urllib3/commit/cd770b059b54…
- Release notes github.com/urllib3/urllib3/releases/tag/2.8.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.