Description
Improper Validation of Integrity Check Value vulnerability in hexpm hex allows a package mirror to substitute the tarball that mix hex.package fetch PACKAGE VERSION --output - writes to standard output.

Hex compares a fetched tarball's inner and outer checksums with the repository's signed registry before writing it to a file or unpacking it. The standard output branch of mix hex.package fetch writes the bytes returned by Hex.SCM.fetch/3 without that comparison, and Hex.SCM.fetch/3 doesn't verify freshly downloaded tarballs itself. When a mirror configured with HEX_MIRROR_URL or mirror_url serves altered bytes, the command prints them and exits successfully, while the same fetch with --output FILE fails with a checksum mismatch.

Hex also prints diagnostics to standard output while the command runs: the body of a failed HTTP response from the update check or a registry fetch, and API warnings from the x-hex-message header. A mirror that answers one of those requests with an error whose body is a tar archive gets that archive written to standard output ahead of the verified tarball, so a pipeline that unpacks standard output extracts the mirror's files. This happens even when the checksum check then fails, because the archive is already on standard output.

This issue affects hex: from 0.20.2 before 2.5.2.
Published: 2026-10-12
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Code Execution
Action: Patch Now
AI Analysis

Impact

Hex, the package manager for the Elixir ecosystem, writes unverified tarball data directly to standard output when a user runs mix hex.package fetch with the - output flag. The integrity checks that normally compare the tarball’s hash against the signed registry data are omitted for this output path, meaning a malicious or compromised mirror can substitute a forged archive that will be emitted unfiltered. If that output is piped into a program that extracts the archive—such as a typical build pipeline—the attacker could supply code that is executed in the user’s environment, leading to arbitrary code execution or tampering of dependencies.

Affected Systems

The vulnerability affects the Hexpm Hex package manager from release 0.20.2 up to, but not including, version 2.5.2. Users running release 0.20.2 through 2.5.1 and using mix hex.package fetch with the standard output flag are susceptible. The product is Hexpm's Hex package manager.

Risk and Exploitability

The CVSS score of 6.9 indicates a moderate level of risk, although the EPSS score is not available, so the current exploitation likelihood cannot be precisely quantified. The vulnerability is not listed in the CISA KEV catalog. Attackers must control or intercept the package mirror to supply altered tarball bytes, or exploit a mirror that returns an error response containing a malicious archive. Because the standard output channel is used, any pipeline that unpacks the data can trigger the exploit. Upgrading to version 2.5.2 or later, which performs checksum verification even when outputting to standard output, mitigates the issue.

Generated by OpenCVE AI on October 12, 2026 at 16:51 UTC.

Remediation

Vendor Solution

Upgrade Hex to 2.5.2 or later, for example with mix local.hex. mix hex.package fetch PACKAGE VERSION --output - then verifies the registry checksum before writing the tarball to standard output and prints its messages to standard error.


Vendor Workaround

Write the tarball to a file with --output FILE, which verifies the checksums, and read that file instead of standard output.


OpenCVE Recommended Actions

  • Upgrade Hex to 2.5.2 or a later release.
  • When upgrading is not immediately possible, use the --output FILE option for mix hex.package fetch so the archive is written to a file and verified before it can be accessed.
  • Avoid piping the output of mix hex.package fetch --output - directly into unpack commands; verify checksums manually or use the verified file output instead.

Generated by OpenCVE AI on October 12, 2026 at 16:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 17 Oct 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 16 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N'}

threat_severity

Moderate


Mon, 12 Oct 2026 15:45:00 +0000

Type Values Removed Values Added
Description Improper Validation of Integrity Check Value vulnerability in hexpm hex allows a package mirror to substitute the tarball that mix hex.package fetch PACKAGE VERSION --output - writes to standard output. Hex compares a fetched tarball's inner and outer checksums with the repository's signed registry before writing it to a file or unpacking it. The standard output branch of mix hex.package fetch writes the bytes returned by Hex.SCM.fetch/3 without that comparison, and Hex.SCM.fetch/3 doesn't verify freshly downloaded tarballs itself. When a mirror configured with HEX_MIRROR_URL or mirror_url serves altered bytes, the command prints them and exits successfully, while the same fetch with --output FILE fails with a checksum mismatch. Hex also prints diagnostics to standard output while the command runs: the body of a failed HTTP response from the update check or a registry fetch, and API warnings from the x-hex-message header. A mirror that answers one of those requests with an error whose body is a tar archive gets that archive written to standard output ahead of the verified tarball, so a pipeline that unpacks standard output extracts the mirror's files. This happens even when the checksum check then fails, because the archive is already on standard output. This issue affects hex: from 0.20.2 before 2.5.2.
Title Hex writes unverified package tarballs to standard output in mix hex.package fetch
First Time appeared Hexpm
Hexpm hex
Weaknesses CWE-354
CPEs cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*
Vendors & Products Hexpm
Hexpm hex
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-10-16T17:37:21.498Z

Reserved: 2026-10-08T13:45:02.134Z

Link: CVE-2026-105280

cve-icon Vulnrichment

Updated: 2026-10-16T17:37:17.455Z

cve-icon NVD

Status : Deferred

Published: 2026-10-12T16:17:02.680

Modified: 2026-10-16T18:17:21.547

Link: CVE-2026-105280

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-12T15:30:14Z

Links: CVE-2026-105280 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-12T17:00:14Z

Weaknesses
  • CWE-354

    Improper Validation of Integrity Check Value