CVE-2026-96612
Received Received - Intake

Path Traversal in Hex Package Manager

Vulnerability report for CVE-2026-96612, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-12

Last updated on: 2026-10-12

Assigner: EEF

Description

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in hexpm hex allows a malicious package publisher to delete a directory outside the project's deps directory and extract package files into it when a developer fetches dependencies. A package release's requirements carry an app label that names the dependency's OTP application. Hex takes this label from the repository's signed registry and uses it as the dependency's application name without validating it (Hex.RemoteConverger.deps/2, Hex.Mix.to_lock/1). Mix derives the dependency's checkout directory as deps/<app>, and Hex.SCM.update/1 runs File.rm_rf!/1 on that directory and unpacks the package into it. hex.pm only checks the label's length, so a publisher can set it to a value such as ../../target. When a project depends on such a release directly or transitively, mix deps.get or mix deps.update deletes the directory the label resolves to and writes the labelled package's files there. This happens before any dependency code is compiled. This issue affects hex: from 0.6.0 before 2.5.2.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-12
Last Modified
2026-10-12
Generated
2026-10-12
AI Q&A
2026-10-12
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
hexpm hex 0.6.0
hexpm hex 380f87054e1bc08ee13d2b5311bc01f98dad2fc6

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-96612 is a path traversal vulnerability in the Hex package manager for Elixir. It allows malicious package publishers to craft dependency labels with path traversal sequences like ../../target. When developers fetch dependencies using mix deps.get or mix deps.update, Hex deletes the directory specified by the label and extracts package files there, potentially overwriting sensitive files outside the intended dependencies folder.

Detection Guidance

Check Hex version with mix hex.info. If version is below 2.5.2, the system is vulnerable. Review dependency labels in mix.lock for invalid characters or path traversal sequences like ../../target.

Impact Analysis

This vulnerability can lead to arbitrary file writes in directories accessible to the developer. It may enable code execution if attacker-controlled files are later executed or loaded. The issue affects projects with dependencies containing crafted labels, either directly or transitively, and can impact both public packages on hex.pm and self-hosted repositories.

Mitigation Strategies

Upgrade Hex to version 2.5.2 or later using mix local.hex. Rebuild dependencies with mix deps.clean --all followed by mix deps.get. Review and remove any suspicious dependencies.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-96612. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart