{"id":"CVE-2026-97200","aliases":["EEF-CVE-2026-97200","EUVD-2026-109837","GHSA-wpmp-4grc-56ph"],"status":"published","title":"Unbounded response body buffering and decompression in hackney","description":"Allocation of Resources Without Limits or Throttling vulnerability in hackney_conn in benoitc hackney allows a malicious HTTP server to exhaust client memory via an oversized or highly compressed response body. hackney:request/5 and hackney:body/1 return the whole response body, and nothing bounds how much the connection process buffers. Any server the client requests can trigger it.\n\nhackney_conn:read_full_body/2 and the HTTP/2 and HTTP/3 accumulators append every chunk until the body ends. With {auto_decompress, true} the buffered body is then inflated in one step with zlib:gunzip/1 or zlib:inflate/2, which return the whole output at once.\n\nThis issue affects hackney: from 2.0.0-beta.1 before 4.9.0.","severity":{"version":"4.0","score":8.2,"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:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00564,"percentile":0.47197,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-409","CWE-770"],"published":"2026-10-26T13:49:40Z","modified":"2026-10-29T02:48:34Z","fixes":[{"ecosystem":"Hex","package":"hackney","fixed_in":["4.9.0"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Hex","package":"hackney","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0-beta.1"},{"fixed":"4.9.0"}]}],"versions":["2.0.0","2.0.0-beta.1","2.0.1","3.0.0","3.0.1","3.0.2","3.0.3","3.1.0","3.1.1","3.1.2","3.2.0","3.2.1","4.0.0","4.0.1","4.0.2","4.0.3","4.1.0","4.2.0","4.2.1","4.2.2","4.2.3","4.3.0","4.4.0","4.4.1","4.4.2","4.4.3","4.4.5","4.5.0","4.5.1","4.5.2","4.6.0","4.6.1","4.7.0","4.7.1","4.7.2","4.7.3","4.7.4","4.8.0","4.8.1","4.8.2","4.8.3","4.8.4","4.8.5","4.8.6","4.8.7"]}],"products":[{"vendor":"benoitc","product":"hackney"},{"vendor":"hackney","product":"hackney"}],"references":[{"url":"https://github.com/benoitc/hackney/releases/tag/4.9.0","tags":["vendor-advisory","related","advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-97200.html","tags":["related","web"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-97200","tags":["related","web"]},{"url":"https://github.com/benoitc/hackney/pull/980","tags":["related","fix","web"]},{"url":"https://github.com/benoitc/hackney/commit/dc41b79339ca0c41e16d3f2dd17172bc2de855d6","tags":["related","fix","web"]},{"url":"https://github.com/benoitc/hackney/commit/493e8bf83a391548e5101792276ab3fc428fa76c","tags":["patch","fix"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97200","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-wpmp-4grc-56ph"},{"url":"https://github.com","tags":["web"]},{"url":"https://repo.hex.pm","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/97xxx/CVE-2026-97200.json","tags":["advisory"]},{"url":"https://github.com/benoitc/hackney","tags":["package"]},{"url":"https://hex.pm/packages/hackney","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-97200","title":"Unbounded response body buffering and decompression in hackney","description":"Allocation of Resources Without Limits or Throttling vulnerability in hackney_conn in benoitc hackney allows a malicious HTTP server to exhaust client memory via an oversized or highly compressed response body. hackney:request/5 and hackney:body/1 return the whole response body, and nothing bounds how much the connection process buffers. Any server the client requests can trigger it.\n\nhackney_conn:read_full_body/2 and the HTTP/2 and HTTP/3 accumulators append every chunk until the body ends. With {auto_decompress, true} the buffered body is then inflated in one step with zlib:gunzip/1 or zlib:inflate/2, which return the whole output at once.\n\nThis issue affects hackney: from 2.0.0-beta.1 before 4.9.0.","status":"published","published":"2026-10-26T13:49:40.392Z","modified":"2026-10-26T15:35:50.487Z","cvss":[{"version":"4.0","score":8.2,"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:N","level":"high","assessor":"cna"}],"cwes":["CWE-409","CWE-770"],"updated_at":"2026-11-02T13:44:18.366073Z"}],"euvd":[{"id":"EUVD-2026-109837","description":"Allocation of Resources Without Limits or Throttling vulnerability in hackney_conn in benoitc hackney allows a malicious HTTP server to exhaust client memory via an oversized or highly compressed response body. hackney:request/5 and hackney:body/1 return the whole response body, and nothing bounds how much the connection process buffers. Any server the client requests can trigger it.\n\nhackney_conn:read_full_body/2 and the HTTP/2 and HTTP/3 accumulators append every chunk until the body ends. With {auto_decompress, true} the buffered body is then inflated in one step with zlib:gunzip/1 or zlib:inflate/2, which return the whole output at once.\n\nThis issue affects hackney: from 2.0.0-beta.1 before 4.9.0.","status":"published","published":"2026-10-26T13:49:40Z","modified":"2026-10-26T15:35:50Z","cvss":[{"version":"4.0","score":8.2,"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:N","level":"high"}],"updated_at":"2026-11-02T16:59:29.561971Z"}],"ghsa":[{"id":"GHSA-wpmp-4grc-56ph","title":"Allocation of Resources Without Limits or Throttling vulnerability in hackney_conn in benoitc...","description":"Allocation of Resources Without Limits or Throttling vulnerability in hackney_conn in benoitc hackney allows a malicious HTTP server to exhaust client memory via an oversized or highly compressed response body. hackney:request/5 and hackney:body/1 return the whole response body, and nothing bounds how much the connection process buffers. Any server the client requests can trigger it.\n\nhackney_conn:read_full_body/2 and the HTTP/2 and HTTP/3 accumulators append every chunk until the body ends. With {auto_decompress, true} the buffered body is then inflated in one step with zlib:gunzip/1 or zlib:inflate/2, which return the whole output at once.\n\nThis issue affects hackney: from 2.0.0-beta.1 before 4.9.0.","status":"published","published":"2026-10-26T15:34:45Z","modified":"2026-10-26T15:34:53Z","cvss":[{"version":"4.0","score":8.2,"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:N/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","level":"high"}],"cwes":["CWE-409"],"updated_at":"2026-11-02T15:14:23.996006Z"}],"nvd":[{"id":"CVE-2026-97200","description":"Allocation of Resources Without Limits or Throttling vulnerability in hackney_conn in benoitc hackney allows a malicious HTTP server to exhaust client memory via an oversized or highly compressed response body. hackney:request/5 and hackney:body/1 return the whole response body, and nothing bounds how much the connection process buffers. Any server the client requests can trigger it.\n\nhackney_conn:read_full_body/2 and the HTTP/2 and HTTP/3 accumulators append every chunk until the body ends. With {auto_decompress, true} the buffered body is then inflated in one step with zlib:gunzip/1 or zlib:inflate/2, which return the whole output at once.\n\nThis issue affects hackney: from 2.0.0-beta.1 before 4.9.0.","status":"published","published":"2026-10-26T14:16:42.18Z","modified":"2026-10-26T16:59:16.113Z","cvss":[{"version":"4.0","score":8.2,"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:N/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","level":"high","assessor":"secondary"}],"cwes":["CWE-409","CWE-770"],"updated_at":"2026-11-02T14:13:03.452847Z"}],"osv":[{"id":"CVE-2026-97200","title":"Unbounded response body buffering and decompression in hackney","description":"Allocation of Resources Without Limits or Throttling vulnerability in hackney_conn in benoitc hackney allows a malicious HTTP server to exhaust client memory via an oversized or highly compressed response body. hackney:request/5 and hackney:body/1 return the whole response body, and nothing bounds how much the connection process buffers. Any server the client requests can trigger it.\n\nhackney_conn:read_full_body/2 and the HTTP/2 and HTTP/3 accumulators append every chunk until the body ends. With {auto_decompress, true} the buffered body is then inflated in one step with zlib:gunzip/1 or zlib:inflate/2, which return the whole output at once.\n\nThis issue affects hackney: from 2.0.0-beta.1 before 4.9.0.","status":"published","published":"2026-10-26T13:49:40.392Z","modified":"2026-10-29T02:48:34.37496686Z","cvss":[{"version":"4.0","score":8.2,"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:N","level":"high"}],"cwes":["CWE-409","CWE-770"],"updated_at":"2026-11-02T15:45:21.262447Z"},{"id":"EEF-CVE-2026-97200","title":"Unbounded response body buffering and decompression in hackney","description":"## Summary\n\nAllocation of Resources Without Limits or Throttling vulnerability in `hackney_conn` in benoitc hackney allows a malicious HTTP server to exhaust client memory via an oversized or highly compressed response body. `hackney:request/5` and `hackney:body/1` return the whole response body, and nothing bounds how much the connection process buffers. Any server the client requests can trigger it.\n\n`hackney_conn:read_full_body/2` and the HTTP/2 and HTTP/3 accumulators append every chunk until the body ends. With `{auto_decompress, true}` the buffered body is then inflated in one step with `zlib:gunzip/1` or `zlib:inflate/2`, which return the whole output at once.\n\nThis issue affects hackney: from 2.0.0-beta.1 before 4.9.0.\n\n## Details\n\n**1. Unbounded accumulation.** `hackney:request/5` with a body, and `hackney:body/1` after `start_response/1`, read the response in `src/hackney_conn.erl` through `read_full_body/2`, which appends each chunk to a binary accumulator until the body ends. The HTTP/2 and HTTP/3 synchronous paths accumulate stream data the same way. No option caps the size.\n\n**2. One-step decompression.** With `{auto_decompress, true}` hackney sends `Accept-Encoding: gzip, deflate`. Once the body is complete, `maybe_decompress_body/2` dispatches on `Content-Encoding` to `decompress_gzip/1` (`zlib:gunzip/1`) or `decompress_deflate/1` (`zlib:inflate/2`). Both return the whole output at once, so the inflated size is bounded only by the compression ratio. The report measured a 1 MB gzip body inflating to 1 GB on hackney 4.8.4.\n\n## Proof of concept\n\n1. Build a gzip stream whose inflated size is 1 GB from a reused 64 KB chunk of zero bytes (deflate with window bits 31, best compression). The stream is about 1 MB on the wire.\n2. Start a TCP listener on loopback that accepts one connection, reads the request, and answers `HTTP/1.1 200 OK` with `Content-Encoding: gzip`, a `Content-Length` matching the stream, `Connection: close`, and the stream as body.\n3. From a node running a vulnerable hackney, call `hackney:request(get, Url, [], \u003c\u003c\u003e\u003e, [{auto_decompress, true}, with_body])` against that listener.\n4. Observe the returned body of 1,048,576,000 bytes and the VM memory growing by about 1.8 GB for a 1,019,197 byte response. A larger stream, or an endless body without `auto_decompress`, drives the node out of memory.\n\n## Impact\n\nA server the client requests can make the client allocate memory proportional to the body it sends, or to its decompressed size, until the node runs out of memory.\n\n## Workarounds\n\nLeave `auto_decompress` disabled (the default). Without it `hackney_conn:maybe_decompress_body/2` never inflates the body, which closes the amplification half. The uncapped raw body read has no workaround.","status":"published","published":"2026-10-26T13:49:40.392Z","modified":"2026-10-26T14:00:04.842482189Z","cvss":[{"version":"4.0","score":8.2,"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:N","level":"high"}],"cwes":["CWE-409","CWE-770"],"updated_at":"2026-11-02T15:46:33.520522Z"}]}}
