{"id":"CVE-2026-97689","kind":"vulnerability","aliases":["CVE-2026-97689","GHSA-vxq7-64xx-v4gw"],"related":[],"title":"urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory","description":"## Impact\r\n\r\nurllib3's [streaming API](https://urllib3.readthedocs.io/en/2.7.0/advanced-usage.html#streaming-and-i-o) is designed for efficiently handling large HTTP responses by reading the content in chunks, rather than loading the entire response body into memory at once. When decoding a [chunked-transfer-encoded response](https://httpwg.org/specs/rfc9112.html#chunked.encoding), this API reads each chunk's size field by buffering until it sees `\\n` or EOF.\r\n\r\nA malicious HTTP server can return `Transfer-Encoding: chunked` and then send a very long run of bytes without any newline, causing the streaming client to buffer that entire run before urllib3 can reject the chunk size as invalid and allocate more memory than intended.\r\n\r\nTo fix the issue, we'll reject chunk-size fields larger than 65536 bytes, as already done in the non-streaming case, which is currently handled by the Python standard library. Note that this only applies to reading the chunk-size field, not the chunk data, which is already handled correctly. As thus, we don't expect any impact for non-malicious servers.\r\n\r\n## Affected usages\r\n\r\nApplications and libraries using urllib3 versions earlier than 2.8.0 may be affected when streaming a chunked response from untrusted sources. Specifically, this affects the [read_chunked()](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.BaseHTTPResponse.read_chunked) and [stream()](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.BaseHTTPResponse.stream) methods of he HTTPResponse object.\r\n\r\nThis also affects requests streaming API, which uses urllib3 under the hood.\r\n\r\n## Remediation\r\n\r\nUpgrade to urllib3 version 2.8.0 or later, where chunk-size fields larger than 66536 will be rejected. If upgrading is not immediately possible, consider reading the response at once using the [read()](https://urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.BaseHTTPResponse.read) method.","summary":"urllib3's stream() and read_chunked() methods buffer the chunk-size line of a chunked HTTP response until a newline arrives, with no size limit. A malicious server can send a long run of bytes without a newline, forcing the client to allocate excess memory before the response is rejected.","severity":"high","cvss":8.9,"epss":0.00335,"exploited":false,"exploited_at":null,"products":[{"name":"urllib3","note":">=1.10.3, <2.8.0","fixed":["2.8.0"],"affected":">= 1.10.3, < 2.8.0","ecosystem":"pypi"},{"name":"python urllib3","fixed":["2.8.0"],"affected":">= 1.10.3, < 2.8.0","ecosystem":"vendor"}],"ecosystems":["pypi","vendor"],"tags":["cwe-770","package","python","requests","self-hosted","urllib3"],"not_affected_if":["non-streaming-reads","trusted-servers-only"],"how_to_check":"- Find the pinned version with `pip show urllib3` or `pip freeze | grep -i urllib3`\n- Search code for `.stream(` or `.read_chunked(` calls on responses from untrusted hosts, including `requests` streaming with `stream=True`","fix":"- urllib3 `2.8.0` or later (fixes affected range `>= 1.10.3, < 2.8.0`)\n- If upgrading is not immediately possible, the advisory suggests reading the response at once with `read()` instead of streaming","status":"open","published_at":"2026-09-15T19:42:30+00:00","first_seen_at":"2026-11-09T22:53:21+00:00","triaged_at":"2026-11-09T22:59:00+00:00","updated_at":"2026-11-09T23:10:12+00:00","category":"package","confidence":0.9,"triage":{"at":"2026-11-09T22:59:00Z","model":"claude-haiku-5-5","output":{"fix":"- urllib3 `2.8.0` or later (fixes affected range `>= 1.10.3, < 2.8.0`)\n- If upgrading is not immediately possible, the advisory suggests reading the response at once with `read()` instead of streaming","reach":"internet","title":"urllib3: streaming chunked responses buffer unbounded chunk-size lines into memory","impact":"medium","summary":"urllib3's stream() and read_chunked() methods buffer the chunk-size line of a chunked HTTP response until a newline arrives, with no size limit. A malicious server can send a long run of bytes without a newline, forcing the client to allocate excess memory before the response is rejected.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","urllib3","requests","self-hosted"],"confidence":0.9,"fix_status":"available","needs_auth":"no","worst_case":"A remote server exhausts client memory, causing a denial of service.","analyst_note":"","how_to_check":"- Find the pinned version with `pip show urllib3` or `pip freeze | grep -i urllib3`\n- Search code for `.stream(` or `.read_chunked(` calls on responses from untrusted hosts, including `requests` streaming with `stream=True`","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["non-streaming-reads","trusted-servers-only"],"who_is_affected":"Applications and libraries that use urllib3 before 2.8.0 to stream chunked HTTP responses from servers they do not trust are exposed, and this includes code using the requests library with streaming enabled. Applications that only call urllib3 for non-streaming reads or only talk to trusted servers have less exposure.","user_interaction":"no","product_ecosystem":"pypi","needs_special_setup":"no","severity_if_unknown":"unknown"},"cost_usd":0.000857,"input_tokens":5367,"output_tokens":641,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':14A,22A '-770':28B '-97689':15A,23A '/en/2.7.0/advanced-usage.html#streaming-and-i-o)':94C '/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.read)':349C '/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.read_chunked)':290C '/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.stream)':295C '/read_chunked':3A '/specs/rfc9112.html#chunked.encoding),':130C '2.8.0':270C,318C '64xx':19A '65536':206C '66536':328C 'affect':260C,273C,284C,303C 'alloc':79B,188C 'alreadi':209C,244C 'also':302C 'api':91C,132C,306C 'appli':230C 'applic':262C 'arriv':57B 'bodi':115C 'buffer':4A,43B,140C,174C 'byte':71B,165C,207C 'case':216C 'caus':169C 'chunk':8A,41B,46B,51B,108C,124C,135C,156C,183C,201C,235C,240C,277C,287C,323C 'chunk-siz':7A,45B,200C,234C,322C 'chunked-transfer-encod':123C 'client':77B,172C 'consid':338C 'content':106C 'correct':246C 'current':219C 'cve':13A,21A 'cwe':27B 'data':241C 'decod':121C 'design':96C 'done':210C 'earlier':268C 'effici':98C 'encod':126C,155C 'entir':113C,176C 'eof':146C 'excess':80B 'expect':252C 'field':138C,203C,237C,325C 'fix':194C 'forc':75B 'ghsa':17A 'ghsa-vxq7-64xx-v4gw':16A 'handl':99C,220C,245C 'hood':312C 'host':34B 'http':52B,101C,149C 'httprespons':299C 'httpresponse.stream':2A 'httpwg.org':129C 'httpwg.org/specs/rfc9112.html#chunked.encoding),':128C 'immedi':336C 'impact':87C,254C 'intend':192C 'invalid':186C 'issu':196C 'larg':100C 'larger':204C,326C 'later':320C 'librari':225C,264C 'limit':61B 'line':10A,48B 'll':198C 'load':111C 'long':68B,162C 'malici':63B,148C,258C 'may':271C 'memori':12A,81B,117C,190C 'method':42B,296C,350C 'n':144C 'newlin':56B,74B,168C 'non':214C,257C 'non-malici':256C 'non-stream':213C 'note':226C 'object':300C 'packag':29B 'possibl':337C 'python':25A,30B,223C 'rather':109C 'read':40B,104C,133C,232C,286C,339C,346C 'reject':86B,181C,199C,331C 'remedi':313C 'request':31B,304C 'respons':53B,84B,102C,114C,127C,278C,341C 'return':152C 'run':69B,163C,177C 'see':143C 'self':33B 'self-host':32B 'send':66B,159C 'server':64B,150C,259C 'size':9A,47B,60B,137C,184C,202C,236C,324C 'sourc':281C 'specif':282C 'standard':224C 'stream':38B,90C,171C,215C,275C,292C,305C 'thus':248C 'transfer':125C,154C 'transfer-encod':153C 'unbound':6A 'untrust':280C 'upgrad':314C,333C 'urllib3':1A,24A,26A,35B,36B,88C,179C,266C,309C,316C 'urllib3.readthedocs.io':93C,289C,294C,348C 'urllib3.readthedocs.io/en/2.7.0/advanced-usage.html#streaming-and-i-o)':92C 'urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.read)':347C 'urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.read_chunked)':288C 'urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.stream)':293C 'usag':261C 'use':265C,308C,344C 'v4gw':20A 'version':267C,317C 'vxq7':18A 'without':72B,166C","nicknames":[],"mitigations":[],"who_affected":"Applications and libraries that use urllib3 before 2.8.0 to stream chunked HTTP responses from servers they do not trust are exposed, and this includes code using the requests library with streaming enabled. Applications that only call urllib3 for non-streaming reads or only talk to trusted servers have less exposure.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["pythonurllib3","urllib3"],"ptokens":["python","urllib3"],"labels":["cwe770","high","package","pypi","python","requests","selfhosted","urllib3","vendor"],"campaign_type":null,"search_a":"'-2026':14A,22A '-97689':15A,23A '/read_chunked':3A '64xx':19A 'buffer':4A 'chunk':8A 'chunk-siz':7A 'cve':13A,21A 'ghsa':17A 'ghsa-vxq7-64xx-v4gw':16A 'httpresponse.stream':2A 'line':10A 'memori':12A 'python':25A 'size':9A 'unbound':6A 'urllib3':1A,24A,26A 'v4gw':20A 'vxq7':18A","search_b":"'-770':28B 'alloc':79B 'arriv':57B 'buffer':43B 'byte':71B 'chunk':41B,46B,51B 'chunk-siz':45B 'client':77B 'cwe':27B 'excess':80B 'forc':75B 'host':34B 'http':52B 'limit':61B 'line':48B 'long':68B 'malici':63B 'memori':81B 'method':42B 'newlin':56B,74B 'packag':29B 'python':30B 'read':40B 'reject':86B 'request':31B 'respons':53B,84B 'run':69B 'self':33B 'self-host':32B 'send':66B 'server':64B 'size':47B,60B 'stream':38B 'urllib3':35B,36B 'without':72B","search_c":"'/en/2.7.0/advanced-usage.html#streaming-and-i-o)':94C '/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.read)':349C '/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.read_chunked)':290C '/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.stream)':295C '/specs/rfc9112.html#chunked.encoding),':130C '2.8.0':270C,318C '65536':206C '66536':328C 'affect':260C,273C,284C,303C 'alloc':188C 'alreadi':209C,244C 'also':302C 'api':91C,132C,306C 'appli':230C 'applic':262C 'bodi':115C 'buffer':140C,174C 'byte':165C,207C 'case':216C 'caus':169C 'chunk':108C,124C,135C,156C,183C,201C,235C,240C,277C,287C,323C 'chunk-siz':200C,234C,322C 'chunked-transfer-encod':123C 'client':172C 'consid':338C 'content':106C 'correct':246C 'current':219C 'data':241C 'decod':121C 'design':96C 'done':210C 'earlier':268C 'effici':98C 'encod':126C,155C 'entir':113C,176C 'eof':146C 'expect':252C 'field':138C,203C,237C,325C 'fix':194C 'handl':99C,220C,245C 'hood':312C 'http':101C,149C 'httprespons':299C 'httpwg.org':129C 'httpwg.org/specs/rfc9112.html#chunked.encoding),':128C 'immedi':336C 'impact':87C,254C 'intend':192C 'invalid':186C 'issu':196C 'larg':100C 'larger':204C,326C 'later':320C 'librari':225C,264C 'll':198C 'load':111C 'long':162C 'malici':148C,258C 'may':271C 'memori':117C,190C 'method':296C,350C 'n':144C 'newlin':168C 'non':214C,257C 'non-malici':256C 'non-stream':213C 'note':226C 'object':300C 'possibl':337C 'python':223C 'rather':109C 'read':104C,133C,232C,286C,339C,346C 'reject':181C,199C,331C 'remedi':313C 'request':304C 'respons':102C,114C,127C,278C,341C 'return':152C 'run':163C,177C 'see':143C 'send':159C 'server':150C,259C 'size':137C,184C,202C,236C,324C 'sourc':281C 'specif':282C 'standard':224C 'stream':90C,171C,215C,275C,292C,305C 'thus':248C 'transfer':125C,154C 'transfer-encod':153C 'untrust':280C 'upgrad':314C,333C 'urllib3':88C,179C,266C,309C,316C 'urllib3.readthedocs.io':93C,289C,294C,348C 'urllib3.readthedocs.io/en/2.7.0/advanced-usage.html#streaming-and-i-o)':92C 'urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.read)':347C 'urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.read_chunked)':288C 'urllib3.readthedocs.io/en/stable/reference/urllib3.response.html#urllib3.response.basehttpresponse.stream)':293C 'usag':261C 'use':265C,308C,344C 'version':267C,317C 'without':166C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-09-15T19:42:30+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"ghsa-repo","external_id":"GHSA-vxq7-64xx-v4gw","url":"https://github.com/urllib3/urllib3/security/advisories/GHSA-vxq7-64xx-v4gw","severity":"high","published_at":"2026-09-15T19:42:30+00:00","modified_at":"2026-09-29T15:34:16+00:00","first_seen_at":"2026-11-09T22:53:21+00:00","fetched_at":"2026-11-09T22:53:21+00:00","note":null},{"source":"ghsa","external_id":"GHSA-vxq7-64xx-v4gw","url":"https://github.com/advisories/GHSA-vxq7-64xx-v4gw","severity":"high","published_at":"2026-09-30T14:46:18+00:00","modified_at":"2026-09-30T14:46:20+00:00","first_seen_at":"2026-11-09T22:57:50+00:00","fetched_at":"2026-11-09T22:57:50+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-97689","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97689","severity":null,"published_at":"2026-09-29T16:17:18+00:00","modified_at":"2026-10-13T20:20:06+00:00","first_seen_at":"2026-11-09T23:10:12+00:00","fetched_at":"2026-11-09T23:10:12+00:00","note":null}],"documents":[{"id":110527,"url":"https://github.com/urllib3/urllib3/security/advisories/GHSA-vxq7-64xx-v4gw","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa-repo","publisher":"vendor","text":null,"published_at":"2026-09-15T19:42:30+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":110878,"url":"https://api.github.com/repos/urllib3/urllib3/security-advisories/GHSA-vxq7-64xx-v4gw","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":110880,"url":"https://github.com/urllib3/urllib3/commit/cd770b059b543be29298ea5c52afb0b1b090f5ed","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":110881,"url":"https://github.com/urllib3/urllib3/releases/tag/2.8.0","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.00335,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-97689"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}