Hex exhausts memory and disk on oversized or compressed responses from an untrusted mirror
## Summary 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/` 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
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-96618
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 06:38 UTC · Revision 1
Source evidence
Hex exhausts memory and disk on oversized or compressed responses from an untrusted mirror
core-osv · Original sourcePublished 12 Oct 2026, 15:29 UTC
## Summary 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/` 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
osv:EEF-CVE-2026-96618
Complete source record
{
"id": "9cf1dd8c1cdf7b030abd09419b27f9d421e1baaa26b1d04b21be6b1e7a2e35d6",
"url": "https://osv.dev/vulnerability/EEF-CVE-2026-96618",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Hex exhausts memory and disk on oversized or compressed responses from an untrusted mirror",
"summary": "## Summary 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/` 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 ",
"evidence": "osv:EEF-CVE-2026-96618",
"products": [],
"severity": "low",
"structured": {
"id": "EEF-CVE-2026-96618",
"aliases": [
"CVE-2026-96618",
"EEF-CVE-2026-96618",
"GHSA-gf42-pg2f-63jp"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "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"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/hexpm/hex",
"type": "GIT",
"events": [
{
"introduced": "51ea632424fb6ea8765148f96dc25dfeb526b1f8"
},
{
"fixed": "bb5189eade682c5fc3f98d9725973a7beb4e1deb"
},
{
"fixed": "08956100a8283ba500a123e5539ac64d5d7e91d8"
}
]
}
],
"database_specific": {
"source": "https://cna.erlef.org/osv/EEF-CVE-2026-96618.json"
}
}
],
"modified": "2026-10-12T15:41:14.855259329Z",
"provider": "osv",
"references": [
"https://github.com/hexpm/hex/security/advisories/GHSA-gf42-pg2f-63jp",
"https://cna.erlef.org/cves/CVE-2026-96618.html",
"https://github.com/hexpm/hex/commit/51ea632424fb6ea8765148f96dc25dfeb526b1f8",
"https://github.com/hexpm/hex/commit/bb5189eade682c5fc3f98d9725973a7beb4e1deb",
"https://github.com/hexpm/hex/commit/08956100a8283ba500a123e5539ac64d5d7e91d8"
],
"provider_metadata": {
"cpe_ids": [
"cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*"
],
"cwe_ids": [
"CWE-409",
"CWE-770"
],
"capec_ids": [
"CAPEC-130"
]
}
},
"related_cves": [
{
"value": "CVE-2026-96618",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 300001,
"published_at": "2026-10-12T15:29:19.117+00:00"
}