CVE-2026-96612

Path traversal in Hex via unvalidated dependency app names

  • High 7.5

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.

Key facts

Published
12 Oct 2026
Last changed
11 Nov 2026
Assigned by
EEF
EPSS
0.443% likely to be exploited in the next 30 days, higher than 39.187% of CVEs (scores for 18 Nov 2026)
SSVC (CISA)
Exploitation: none; Automatable: no; Technical impact: total

Severity scores

Each score is shown as its source gave it. They are not averaged or merged.

  • 7.5CVSS 4.0, Highfrom the CNA (EEF)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

What to do

  • Upgrade Hex to 2.5.2 or later, for example with mix local.hex. Hex then skips package releases that give a dependency an application name other than a letter followed by letters, digits, _ and -, and warns about them. Resolution fails if no other release of the package fits the requirements.CNA solution statement
  • Before running mix deps.get on a mix.lock from an untrusted change, check that every key in mix.lock is a plain application name without /, \ or ... There's no workaround for new dependency resolution with mix deps.update or mix deps.get without a lock entry.CNA workaround statement

Historical context and remediation

This reference retains the original CVE publication date. A recent record update does not mean a new attack occurred.

A publisher of any package in a project's dependency tree can make mix deps.get delete a directory that the developer's account can write and that .. segments relative to deps reach, such as the project directory or its parent, and fill it with the labelled package's files. Writing attacker-chosen files into a directory whose contents are later run or loaded can lead to code execution without the developer compiling the dependency. Developers who fetch dependencies to review them before compiling, CI jobs and dependency update bots that only run mix deps.get or mix deps.update are affected. (CNA impact statement)

Version statuses below come from the CNA. An “unaffected” version is not necessarily a currently supported release or proof of a patch date. EPSS is a dated risk estimate, not a count of historical attacks.

Read the original CVE record.

Affected products

VendorProductVersions
hexpmhex
  • Default status: unaffected
  • 0.6.0 up to but excluding 2.5.2 (affected)
hexpmhex
  • Default status: unaffected
  • 380f87054e1bc08ee13d2b5311bc01f98dad2fc6 up to but excluding * (affected); at 1b3e2ae8f0dd7273a2c2625b9e50b6c67c8568fb unaffected, at 72279a8e2004b32b20d8767ff010c117193dd02c unaffected

Timeline

  1. 12 Oct 2026 Published

Weakness

Practice this bug class

HackZoneLabs has a hands-on lab on Path traversal (CWE-22).

References