{"id":"CVE-2026-49755","published":"2026-06-08T15:20:57Z","modified":"2026-11-20T08:40:40Z","title":"Decompression bomb DoS in Req via auto-decoded archive and compressed response bodies","vendor":"wojtekmach","product":"req","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00647,"percentile":0.51946,"provenance":"source"},"cwes":[{"id":"CWE-409","name":"Improper Handling of Highly Compressed Data (Data Amplification)"}],"references":[{"url":"https://github.com/wojtekmach/req/security/advisories/GHSA-655f-mp8p-96gv","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-49755.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-49755","tags":["related"]},{"url":"https://github.com/wojtekmach/req/commit/e37753741cbdc725e6aba3d977b380163bfc0ecb","tags":["related"]},{"url":"https://github.com/wojtekmach/req/commit/84977e5b1a83f26e749d55ad06e3625464af4e8d","tags":["patch"]},{"url":"https://github.com/wojtekmach/req/commit/ea5506fce1d6a44e5f47d0efed314643b3bc4904","tags":["patch"]}],"priority":{"score":16.1,"factors":[{"name":"EPSS percentile","points":10.39},{"name":"CVSS severity","points":5.74}]},"vendorSlug":"wojtekmach","affectedVersions":[{"vendor":"wojtekmach","product":"req","versions":[">= 0.1.0, < 0.6.1"]},{"vendor":"wojtekmach","product":"req","versions":[">= e37753741cbdc725e6aba3d977b380163bfc0ecb"]}],"fixedVersions":[{"vendor":"wojtekmach","product":"req","versions":["84977e5b1a83f26e749d55ad06e3625464af4e8d","ea5506fce1d6a44e5f47d0efed314643b3bc4904"]}],"workarounds":{"items":["Disable 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."],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-197","name":"Exponential Data Expansion"}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-08T16:49:57.977214Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Hex","package":"req","vulnerableRanges":[">=0.1.0, <0.6.1"],"patched":["0.6.1"],"from":["GHSA-655f-mp8p-96gv"],"provenance":"source"}],"summary":{"text":"The flaw is an improper handling of highly compressed data in the Req HTTP client library by wojtekmach, where its default response-processing steps decode archive and compressed response bodies without any size limits. An attacker who controls an HTTP server that a Req client connects to, including through automatic redirects, can send a small response with crafted archive or chained compression headers that expands in memory to gigabytes and crashes the client process, requiring no authentication, user interaction, or non-default configuration.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:27:15Z"},"euvd":{"id":"EUVD-2026-35098","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-wojtekmach-req-cve-2026-49755","parents":[{"from":"CVE-2026-49756","to":"CVE-2026-49755","relation":"successor","confidence":"high","kind":"lineage","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Hex:req","fromFixed":"0.6.0","toFixed":"0.6.1","daysApart":0},{"kind":"same-code","provenance":"machine","files":["lib/req.ex","lib/req/steps.ex"],"commits":["https://github.com/wojtekmach/req/commit/e37753741cbdc725e6aba3d977b380163bfc0ecb","https://github.com/wojtekmach/req/commit/84977e5b1a83f26e749d55ad06e3625464af4e8d","https://github.com/wojtekmach/req/commit/60253dbe9436cb8e9c738f895032f2e87939b597","https://github.com/wojtekmach/req/commit/2d77dbeb6b2a6932fe181432b1c36e9ea1d9fa23"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2026-49756","published":"2026-06-08","fixed":"0.6.0","kev":false},{"cve":"CVE-2026-49755","published":"2026-06-08","fixed":"0.6.1","kev":false}],"package":"Hex:req"}}