# CVE-2026-96612: Path traversal in Hex via unvalidated dependency app names

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **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:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.60% (percentile 43, 2026-11-28)
- **CWE:** CWE-22
- **Published:** 2026-10-12T15:39:49.862Z
- **Modified:** 2026-11-19T08:20:51.765Z

## Who should check

- Anyone running hexpm hex \>= 0.6.0, \< 2.5.2
- Anyone running hexpm hex \>= 380f87054e1bc08ee13d2b5311bc01f98dad2fc6, \< \*

## 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

- hexpm hex: \>= 0.6.0, \< 2.5.2 (cvelist)
- hexpm hex: \>= 380f87054e1bc08ee13d2b5311bc01f98dad2fc6, \< \* (cvelist)

## 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.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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-28).

### 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.

## References

- vendor: <https://github.com/hexpm/hex/security/advisories/GHSA-2vjj-c5hr-6xc3>
- patch: <https://github.com/hexpm/hex/commit/380f87054e1bc08ee13d2b5311bc01f98dad2fc6>
- patch: <https://github.com/hexpm/hex/commit/1b3e2ae8f0dd7273a2c2625b9e50b6c67c8568fb>
- patch: <https://github.com/hexpm/hex/commit/72279a8e2004b32b20d8767ff010c117193dd02c>
- other: <https://cna.erlef.org/cves/CVE-2026-96612.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-96612>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-96612>

HTML: <https://flawdb.com/CVE-2026-96612> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-96612>
