{"id":"CVE-2026-97200","aliases":["CVE-2026-97200","EEF-CVE-2026-97200"],"related":[],"kind":"vulnerability","state":"published","title":"Unbounded response body buffering and decompression in hackney","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## 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, [], <<>>, [{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.","format":"markdown","source":"eef"}],"published":"2026-10-26T13:49:40.392Z","modified":"2026-11-25T06:30:16.004Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","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","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","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","score":8.2,"rating":"HIGH"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","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"}],"cwes":["CWE-409","CWE-770"],"affected":[{"ranges":[{"type":"semver","introduced":"2.0.0-beta.1","fixed":"4.9.0","status":"affected"}],"vendor":"benoitc","product":"hackney","package":"hackney","cpe":"cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*","repo":"https://github.com/benoitc/hackney","source":"cvelist"},{"ranges":[{"type":"git","introduced":"dc41b79339ca0c41e16d3f2dd17172bc2de855d6","fixed":"493e8bf83a391548e5101792276ab3fc428fa76c","status":"affected"}],"vendor":"benoitc","product":"hackney","package":"benoitc/hackney","cpe":"cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*","repo":"https://github.com/benoitc/hackney","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0-beta.1","status":"affected","fixed":"4.9.0"}],"ecosystem":"Hex","package":"hackney","purl":"pkg:hex/hackney","source":"eef"},{"ranges":[{"type":"git","introduced":"dc41b79339ca0c41e16d3f2dd17172bc2de855d6","status":"affected","fixed":"493e8bf83a391548e5101792276ab3fc428fa76c"}],"repo":"https://github.com/benoitc/hackney","source":"eef"}],"references":[{"url":"https://github.com/benoitc/hackney/releases/tag/4.9.0","tags":["advisory","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-97200.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-97200","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/benoitc/hackney/pull/980","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/benoitc/hackney/commit/dc41b79339ca0c41e16d3f2dd17172bc2de855d6","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/benoitc/hackney/commit/493e8bf83a391548e5101792276ab3fc428fa76c","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/hackney","tags":["package"],"sources":["eef"]}],"credits":["Martin Karrer","Quinn Wilton","Jonatan Männchen / EEF","Benoit Chesneau"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-10-26T14:54:57.385Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-97200","url":"https://www.cve.org/CVERecord?id=CVE-2026-97200","licence":"CVE Terms of Use","modified":"2026-11-19T08:06:25.221Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-97200","url":"https://osv.dev/vulnerability/EEF-CVE-2026-97200","licence":"CC-BY-4.0","modified":"2026-11-25T06:30:16.004Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-97200","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97200","licence":"Public domain","modified":"2026-10-26T16:59:16.113Z"}],"updatedAt":"2026-11-25T22:59:47.131Z","epss":{"score":0.00564,"percentile":0.48223,"date":"2026-12-01T12:00:22.000Z"}}