Skip to content

EEF-CVE-2026-49755 CVE-2026-49755 GHSA-655f-mp8p-96gv

Decompression bomb DoS in Req via auto-decoded archive and compressed response bodies

High Hex
Severity
0.0 / 10
High · CVSS 4.0
Exploit chance (EPSS)
0.60%
Chance of exploitation in the next 30 days. Higher than 48.49% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-409 Improper Handling of Highly Compressed Data (Data Amplification)
Fix
0.6.1
Upgrade req to this version or later

Description

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.

Req'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.

Both 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.

This issue affects req: from 0.1.0 before 0.6.1.

Workarounds

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.

Affected versions

Hex

PackageVulnerableFixed in
req
>= 0.1.0, < 0.6.1
0.6.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

req Hex → 0.6.1

mix
{:req, "~> 0.6.1"} # then: mix deps.update req

Severity breakdown

CVSS 4.0 0.0

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

Attack vector
Network
Attack complexity
Low
Attack requirements
Present
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)

The product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-px9f-whj3-246m
Multipart form-data header injection in Req via unescaped name/filename/content_type
Low Also affects req
EEF-CVE-2026-65627
Decompression bomb via unbounded zlib:inflate in jose_jwe_zip:uncompress/2
Not rated yet Same weakness, CWE-409
EEF-CVE-2026-97200
Unbounded response body buffering and decompression in hackney
Not rated yet Same weakness, CWE-409
EEF-CVE-2026-109584
HTTP/2 cookie crumb join expands a small HPACK header block into an unbounded allocation in Bandit
Not rated yet Same weakness, CWE-409
EEF-CVE-2026-93471
Unbounded SAML message decompression in esaml allows memory exhaustion
Not rated yet Same weakness, CWE-409
GHSA-g842-9rc4-69pw
Pillow: Decompression bomb check bypass in SpiderImagePlugin.seek() leads to unbounded allocation DoS
Medium Same weakness, CWE-409
GHSA-p8hx-v2p6-rp84
Pillow: Decompression-bomb protection bypass via multi-frame seek() in MPO and DCX (MpoImageFile.seek / DcxImageFile.seek)
Medium Same weakness, CWE-409
GHSA-gg2r-wvfm-q9rx
Pillow: MSP RLE decoder expands a tiny file into unbounded memory
High Same weakness, CWE-409

Credits: Jonatan Männchen / EEF, Peter Ullrich, Wojtek Mach

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor