# CVE-2026-96618: Hex exhausts memory and disk on oversized or compressed responses from an untrusted mirror

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 2.1
- **CVSS:** 2.1 (v4.0, CNA) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: Active; Confidentiality impact: None; Integrity impact: None; Availability impact: Low; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.58% (percentile 42, 2026-11-28)
- **CWE:** CWE-409, CWE-770
- **Published:** 2026-10-12T15:29:19.117Z
- **Modified:** 2026-11-20T06:17:45.800Z

## Who should check

- Anyone running hexpm hex \>= 0.11.2, \< 2.5.2
- Anyone running hexpm hex \>= 51ea632424fb6ea8765148f96dc25dfeb526b1f8, \< \*

## Description

Improper Handling of Highly Compressed Data (Data Amplification) vulnerability in hexpm hex allows an untrusted package mirror to exhaust the memory or disk space of the machine running mix deps.get, mix deps.update, mix hex.package fetch or mix hex.docs fetch.

Hex treats a mirror configured with HEX\_MIRROR\_URL, HEX\_MIRROR or mirror\_url as untrusted: it doesn't send credentials to it, and it checks registry signatures and package checksums that the mirror can't forge. Several response paths consume memory or disk in proportion to what the mirror sends before any of those checks run.

Hex.HTTP.request/5 reads the whole response body into memory and decompresses it with :zlib.gunzip/1 whenever the response's Content-Encoding contains gzip, with no limit on the compressed or decompressed size. Hex doesn't ask for compressed responses, so the server decides whether this step runs. It applies to registry, package, docs and API responses.

Package tarballs have no download size limit. Hex 2.5.1 holds the whole tarball in memory and writes it to the cache, and the development branch streams it to a temporary file; the 16 MiB tarball limit is checked only when the file is unpacked. The tarball is then unpacked, into deps/\<app\> in 2.5.1 and into a staging directory on the development branch, before its checksums are compared with the registry.

mix hex.docs fetch, and mix hex.docs offline when docs are missing, write the docs tarball to disk and extract it with :mix\_hex\_erl\_tar.extract/2 without the 16 MiB compressed and 128 MiB decompressed limits that mix\_hex\_tarball:unpack\_docs/3 applies. The signed registry doesn't cover docs tarballs, so nothing checks them.

Registry responses are also decompressed before their signature is checked, in hex\_core code that Hex vendors; that part is tracked in https://github.com/hexpm/hex\_core/security/advisories/GHSA-7c4r-cgf9-9jmq.

This issue affects hex: from 0.11.2 before 2.5.2.

## Affected and fixed versions

- hexpm hex: \>= 0.11.2, \< 2.5.2 (cvelist)
- hexpm hex: \>= 51ea632424fb6ea8765148f96dc25dfeb526b1f8, \< \* (cvelist)

## Mitigation

- Upgrade hex to 2.5.2 or later.
- Vendor workaround: Fetch from repo.hex.pm or a mirror you operate. Running Mix under operating system memory and disk limits, such as container limits, confines the effect to that container.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-96618. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-96618.md
Affected: hexpm hex >= 0.11.2, < 2.5.2; hexpm hex >= 51ea632424fb6ea8765148f96dc25dfeb526b1f8, < *
Fixed in: hexpm hex 2.5.2

Steps:
1. Search this machine and project for hexpm hex: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-96618 being exploited?

There is no confirmed exploitation: CVE-2026-96618 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.58% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-96618?

Low: CVSS 2.1 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-96618?

hexpm hex \>= 0.11.2, \< 2.5.2; hexpm hex \>= 51ea632424fb6ea8765148f96dc25dfeb526b1f8, \< \*.

### Is there a fix for CVE-2026-96618?

Yes. Fixed in hexpm hex 2.5.2. Upgrade hex to 2.5.2 or later. Vendor workaround: Fetch from repo.hex.pm or a mirror you operate. Running Mix under operating system memory and disk limits, such as container limits, confines the effect to that container.

### How do I check if I'm affected by CVE-2026-96618?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/hexpm/hex/security/advisories/GHSA-gf42-pg2f-63jp>
- patch: <https://github.com/hexpm/hex/commit/51ea632424fb6ea8765148f96dc25dfeb526b1f8>
- patch: <https://github.com/hexpm/hex/commit/08956100a8283ba500a123e5539ac64d5d7e91d8>
- patch: <https://github.com/hexpm/hex/commit/bb5189eade682c5fc3f98d9725973a7beb4e1deb>
- other: <https://cna.erlef.org/cves/CVE-2026-96618.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-96618>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-96618>

HTML: <https://flawdb.com/CVE-2026-96618> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-96618>
