CVE-2026-96612
Path traversal in Hex via unvalidated dependency app names
Mitigation
- Upgrade hex to 2.5.2 or later.
- Vendor workaround: 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.
Who should check
- Anyone running hexpm hex >= 0.6.0, < 2.5.2
- Anyone running hexpm hex >= 380f87054e1bc08ee13d2b5311bc01f98dad2fc6, < *
Vulnerability facts
- Affected
- hexpm hex >= 0.6.0, < 2.5.2; hexpm hex >= 380f87054e1bc08ee13d2b5311bc01f98dad2fc6, < *
- Fixed in
- hexpm hex 2.5.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.5 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: Active
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- EPSS
- 0.60% chance of exploitation in 30 days (percentile 43, 2026-11-26)
- CWE
- CWE-22
- Modified
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-96612. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-96612.md Affected: hexpm hex >= 0.6.0, < 2.5.2; hexpm hex >= 380f87054e1bc08ee13d2b5311bc01f98dad2fc6, < * Fixed in: hexpm hex 2.5.2 Steps: 1. Search this machine and project for hexpm hex: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2026-96612 being exploited?
There is no confirmed exploitation: CVE-2026-96612 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.60% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-96612?
High: CVSS 7.5 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-96612?
hexpm hex >= 0.6.0, < 2.5.2; hexpm hex >= 380f87054e1bc08ee13d2b5311bc01f98dad2fc6, < *.
Is there a fix for CVE-2026-96612?
Yes. Fixed in hexpm hex 2.5.2. Upgrade hex to 2.5.2 or later. Vendor workaround: 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.
How do I check if I'm affected by CVE-2026-96612?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.