Skip to content
Heist/ feed
Low

Hex exhausts memory and disk on oversized or compressed responses from an untrusted mirror

Type: advisorySource: Official CVE List1 source record

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 it with :mix_hex_erl_tar.extract/2 with

Announced Group revision 1
Original source ↗

CVE-2026-96618

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-96618

hex

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

hex

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "cpes": [
      "cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*"
    ],
    "repo": "https://github.com/hexpm/hex",
    "vendor": "hexpm",
    "modules": [
      "'Elixir.Hex.HTTP'",
      "'Elixir.Hex.SCM'",
      "'Elixir.Mix.Tasks.Hex.Docs'"
    ],
    "product": "hex",
    "versions": [
      {
        "status": "affected",
        "version": "0.11.2",
        "lessThan": "2.5.2",
        "versionType": "semver"
      }
    ],
    "packageURL": "pkg:otp/hex?repository_url=https:%2F%2Fgithub.com%2Fhexpm%2Fhex&vcs_url=repository_url=git%2Bhttps:%2F%2Fgithub.com%2Fhexpm%2Fhex.git",
    "packageName": "hex",
    "programFiles": [
      "lib/hex/http.ex",
      "lib/hex/scm.ex",
      "lib/mix/tasks/hex.docs.ex"
    ],
    "defaultStatus": "unaffected",
    "programRoutines": [
      {
        "name": "'Elixir.Hex.HTTP':request/5"
      },
      {
        "name": "'Elixir.Hex.SCM':fetch/3"
      },
      {
        "name": "'Elixir.Hex.SCM':update/1"
      },
      {
        "name": "'Elixir.Mix.Tasks.Hex.Docs':run/1"
      }
    ]
  },
  {
    "cpes": [
      "cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*"
    ],
    "repo": "https://github.com/hexpm/hex",
    "vendor": "hexpm",
    "modules": [
      "'Elixir.Hex.HTTP'",
      "'Elixir.Hex.SCM'",
      "'Elixir.Mix.Tasks.Hex.Docs'"
    ],
    "product": "hex",
    "versions": [
      {
        "status": "affected",
        "changes": [
          {
            "at": "bb5189eade682c5fc3f98d9725973a7beb4e1deb",
            "status": "unaffected"
          },
          {
            "at": "08956100a8283ba500a123e5539ac64d5d7e91d8",
            "status": "unaffected"
          }
        ],
        "version": "51ea632424fb6ea8765148f96dc25dfeb526b1f8",
        "lessThan": "*",
        "versionType": "git"
      }
    ],
    "packageURL": "pkg:github/hexpm/hex",
    "packageName": "hexpm/hex",
    "programFiles": [
      "lib/hex/http.ex",
      "lib/hex/scm.ex",
      "lib/mix/tasks/hex.docs.ex"
    ],
    "collectionURL": "https://github.com",
    "defaultStatus": "unaffected",
    "programRoutines": [
      {
        "name": "'Elixir.Hex.HTTP':request/5"
      },
      {
        "name": "'Elixir.Hex.SCM':fetch/3"
      },
      {
        "name": "'Elixir.Hex.SCM':update/1"
      },
      {
        "name": "'Elixir.Mix.Tasks.Hex.Docs':run/1"
      }
    ]
  }
]
Related CVEs
CVE-2026-96618

Source reference: /cveMetadata/cveId

Publisher severity

low

Source reference: /containers/cna/metrics

Event
#32882 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement