{"id":"CVE-2026-49755","aliases":["CVE-2026-49755","GHSA-655f-mp8p-96gv","EEF-CVE-2026-49755"],"related":[],"kind":"vulnerability","state":"published","title":"Decompression bomb DoS in Req via auto-decoded archive and compressed response bodies","summary":"Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in wojtekmach Req allows attacker-controlled HTTP servers to exhaust memory in a Req client via decompression-bomb response bodies.\n\nReq's default response pipeline includes Req.Steps.decode_body/1 and Req.Steps.decompress_body/1 in lib/req/steps.ex. decode_body/1 dispatches on the server-supplied content-type (or URL extension) and calls :zip.extract(body, [:memory]) for application/zip, :erl_tar.extract({:binary, body}, [:memory]) for application/x-tar, and :erl_tar.extract({:binary, body}, [:memory, :compressed]) for application/gzip / .tgz. Each returns the full decompressed archive contents as a [{name, bytes}] list in memory, with no per-entry or total size cap. decompress_body/1 walks the content-encoding header and chains :zlib/:brotli/:ezstd decoders, so a response advertising content-encoding: gzip, gzip, gzip inflates through multiple layers without bound.\n\nBoth steps are enabled by default, no caller opt-in is required, and the attacker controls the content-type and content-encoding headers on their own server (or on any host reached via Req's automatic redirect following). A sub-megabyte response can expand to multiple gigabytes on the victim, crashing the BEAM process.\n\nThis issue affects req: from 0.1.0 before 0.6.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in wojtekmach Req allows attacker-controlled HTTP servers to exhaust memory in a Req client via decompression-bomb response bodies.\n\nReq's default response pipeline includes Req.Steps.decode_body/1 and Req.Steps.decompress_body/1 in lib/req/steps.ex. decode_body/1 dispatches on the server-supplied content-type (or URL extension) and calls :zip.extract(body, [:memory]) for application/zip, :erl_tar.extract({:binary, body}, [:memory]) for application/x-tar, and :erl_tar.extract({:binary, body}, [:memory, :compressed]) for application/gzip / .tgz. Each returns the full decompressed archive contents as a [{name, bytes}] list in memory, with no per-entry or total size cap. decompress_body/1 walks the content-encoding header and chains :zlib/:brotli/:ezstd decoders, so a response advertising content-encoding: gzip, gzip, gzip inflates through multiple layers without bound.\n\nBoth steps are enabled by default, no caller opt-in is required, and the attacker controls the content-type and content-encoding headers on their own server (or on any host reached via Req's automatic redirect following). A sub-megabyte response can expand to multiple gigabytes on the victim, crashing the BEAM process.\n\nThis issue affects req: from 0.1.0 before 0.6.1.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nReq's default response pipeline auto-decodes archive and compressed bodies based on the server-supplied `content-type` (or URL extension) and materialises the full decompressed contents in memory with no size cap. An attacker who controls (or can redirect a victim into) an HTTP endpoint reached by `Req.get!/1` can return a tiny \"decompression bomb\" that expands to many gigabytes on the client and exhausts the BEAM's memory.\n\n### Details\n\n**1. Archive auto-decoding.** `Req.Steps.decode_body/1` in `lib/req/steps.ex` dispatches on the response `content-type` (or URL extension) and calls Erlang's archive libraries with `:memory`, returning a `[{name, bytes}]` list of every entry fully decompressed in RAM: `application/zip` → `:zip.extract(body, [:memory])`, `application/x-tar` → `:erl_tar.extract({:binary, body}, [:memory])`, `application/gzip` / `.tgz` → `:erl_tar.extract({:binary, body}, [:memory, :compressed])`. No byte cap is enforced before decoding and no per-entry size limit is passed to `:zip` / `:erl_tar`.\n\n**2. content-encoding chaining.** `Req.Steps.decompress_body/1` walks the `content-encoding` header and chains `:zlib` / `:brotli` / `:ezstd` decoders, so a response advertising `content-encoding: gzip, gzip, gzip, …` inflates through multiple layers without bound.\n\n**3. Default-on, attacker-chosen decoder.** Both steps are part of Req's default pipeline. The caller does not need to opt in, and the attacker chooses which decoder fires by setting `content-type` and `content-encoding` on their own server (or on any host reached via Req's automatic redirect following).\n\n### PoC\n\n1. Run an HTTP server that responds 200 with `content-type: application/zip` and a body that is a zip archive whose single entry is ~400 MB of zero bytes (compressed wire payload: a few hundred KB).\n2. From the victim process, call `Req.get!(url)` against that server (no special options, no opt-in to archive decoding).\n3. `decode_body/1` dispatches on `content-type`, invokes `:zip.extract(body, [:memory])`, and the response body becomes `[{~c\"bomb.bin\", <<400 MB of zero bytes>>}]`. A sub-MB request produces hundreds of MB resident memory; layering gzip on the `content-encoding` path or increasing entry size scales arbitrarily.\n\n### Impact\n\nMemory-exhaustion denial of service against any Elixir application that uses Req with its default step pipeline to fetch URLs influenced by an untrusted party, including webhook senders, link previews, OAuth/OIDC discovery clients, package mirrors, image proxies, and any `Req.get!/1` call that may follow redirects to attacker-controlled hosts. No authentication is required; a single response can crash the BEAM and take down unrelated workloads on the same VM.","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Summary\n\nImproper Handling of Highly Compressed Data (Data Amplification) vulnerability in wojtekmach Req allows attacker-controlled HTTP servers to exhaust memory in a Req client via decompression-bomb response bodies.\n\nReq's default response pipeline includes `Req.Steps.decode_body/1` and `Req.Steps.decompress_body/1` in `lib/req/steps.ex`. `decode_body/1` dispatches on the server-supplied `content-type` (or URL extension) and calls `:zip.extract(body, [:memory])` for `application/zip`, `:erl_tar.extract({:binary, body}, [:memory])` for `application/x-tar`, and `:erl_tar.extract({:binary, body}, [:memory, :compressed])` for `application/gzip` / `.tgz`. Each returns the full decompressed archive contents as a `[{name, bytes}]` list in memory, with no per-entry or total size cap. `decompress_body/1` walks the `content-encoding` header and chains `:zlib`/`:brotli`/`:ezstd` decoders, so a response advertising `content-encoding: gzip, gzip, gzip` inflates through multiple layers without bound.\n\nBoth steps are enabled by default, no caller opt-in is required, and the attacker controls the `content-type` and `content-encoding` headers on their own server (or on any host reached via Req's automatic redirect following). A sub-megabyte response can expand to multiple gigabytes on the victim, crashing the BEAM process.\n\nThis issue affects req: from 0.1.0 before 0.6.1.\n\n## Workarounds\n\nDisable Req's automatic body decoding on requests that fetch attacker-influenced URLs by passing `decode_body: false` to `Req.new/1` / `Req.get!/1`. To also skip the `content-encoding` decompression pipeline, pass `raw: true`. Both options leave the response body as the raw on-the-wire bytes, so the caller can size-check before any decompression.","format":"markdown","source":"eef"},{"lang":"es","text":"La vulnerabilidad de manejo inadecuado de datos altamente comprimidos (amplificación de datos) en wojtekmach Req permite a los servidores HTTP controlados por el atacante agotar la memoria en un cliente Req mediante cuerpos de respuesta de bomba de descompresión.\n\nLa pipeline de respuesta predeterminada de Req incluye Req.Steps.decode_body/1 y Req.Steps.decompress_body/1 en lib/req/steps.ex. decode_body/1 despacha según el content-type proporcionado por el servidor (o extensión de URL) y llama a :zip.extract(body, [:memory]) para application/zip, a :erl_tar.extract({:binary, body}, [:memory]) para application/x-tar, y a :erl_tar.extract({:binary, body}, [:memory, :compressed]) para application/gzip / .tgz. Cada uno devuelve el contenido completo del archivo descomprimido como una lista [{name, bytes}] en memoria, sin límite de tamaño por entrada o total. decompress_body/1 recorre el encabezado content-encoding y encadena decodificadores :zlib/:brotli/:ezstd, por lo que una respuesta que anuncia content-encoding: gzip, gzip, gzip se infla a través de múltiples capas sin límite.\n\nAmbos pasos están habilitados por defecto, no se requiere la participación del llamador, y el atacante controla los encabezados content-type y content-encoding en su propio servidor (o en cualquier host alcanzado a través del seguimiento automático de redirecciones de Req). Una respuesta de menos de un megabyte puede expandirse a múltiples gigabytes en la víctima, colapsando el proceso BEAM.\n\nEste problema afecta a req: desde 0.1.0 antes de 0.6.1.","source":"nvd"}],"published":"2026-06-08T15:20:57.415Z","modified":"2026-11-26T17:23:03.290Z","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":"GitHub","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","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"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-409"],"affected":[{"ranges":[{"type":"semver","introduced":"0.1.0","fixed":"0.6.1","status":"affected"}],"vendor":"wojtekmach","product":"req","package":"req","cpe":"cpe:2.3:a:wojtekmach:req:*:*:*:*:*:*:*:*","repo":"https://github.com/wojtekmach/req","source":"cvelist"},{"ranges":[{"type":"git","introduced":"e37753741cbdc725e6aba3d977b380163bfc0ecb","fixed":"*","status":"affected"}],"vendor":"wojtekmach","product":"req","package":"wojtekmach/req","cpe":"cpe:2.3:a:wojtekmach:req:*:*:*:*:*:*:*:*","repo":"https://github.com/wojtekmach/req","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.1.0","status":"affected","fixed":"0.6.1"}],"ecosystem":"Hex","package":"req","purl":"pkg:hex/req","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.1.0","status":"affected","fixed":"0.6.1"}],"ecosystem":"Hex","package":"req","purl":"pkg:hex/req","source":"eef"},{"ranges":[{"type":"git","introduced":"e37753741cbdc725e6aba3d977b380163bfc0ecb","status":"affected","fixed":"84977e5b1a83f26e749d55ad06e3625464af4e8d"},{"type":"git","status":"affected","fixed":"ea5506fce1d6a44e5f47d0efed314643b3bc4904"}],"repo":"https://github.com/wojtekmach/req","source":"eef"},{"ranges":[{"status":"affected","introduced":"0.1.0","fixed":"0.6.1"}],"vendor":"wojtekmach","product":"req","cpe":"cpe:2.3:a:wojtekmach:req:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/wojtekmach/req/security/advisories/GHSA-655f-mp8p-96gv","tags":["advisory","exploit","patch","related","vendor-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-49755.html","tags":["related","third-party-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-49755","tags":["mitigation","patch","related","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/wojtekmach/req/commit/e37753741cbdc725e6aba3d977b380163bfc0ecb","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/wojtekmach/req/commit/84977e5b1a83f26e749d55ad06e3625464af4e8d","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://github.com/wojtekmach/req/commit/ea5506fce1d6a44e5f47d0efed314643b3bc4904","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49755","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/wojtekmach/req","tags":["package"],"sources":["ghsa"]},{"url":"https://hex.pm/packages/req","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Wojtek Mach"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-08T16:49:57.977Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-49755","url":"https://www.cve.org/CVERecord?id=CVE-2026-49755","licence":"CVE Terms of Use","modified":"2026-11-20T08:40:40.037Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-655f-mp8p-96gv","url":"https://github.com/advisories/GHSA-655f-mp8p-96gv","licence":"CC-BY-4.0","modified":"2026-07-29T15:30:39.580Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-49755","url":"https://osv.dev/vulnerability/EEF-CVE-2026-49755","licence":"CC-BY-4.0","modified":"2026-11-26T17:23:03.290Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-49755","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49755","licence":"Public domain","modified":"2026-11-20T09:20:12.530Z"}],"updatedAt":"2026-11-26T17:37:04.770Z","epss":{"score":0.00744,"percentile":0.55966,"date":"2026-12-01T12:00:22.000Z"}}