{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2026-96612", "assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db", "state": "PUBLISHED", "assignerShortName": "EEF", "dateReserved": "2026-10-01T09:00:02.103Z", "datePublished": "2026-10-12T15:39:49.862Z", "dateUpdated": "2026-10-12T15:39:49.862Z" }, "containers": { "cna": { "affected": [ { "cpes": [ "cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*" ], "defaultStatus": "unaffected", "modules": [ "'Elixir.Hex.RemoteConverger'", "'Elixir.Hex.Mix'", "'Elixir.Hex.SCM'" ], "packageName": "hex", "packageURL": "pkg:otp/hex?repository_url=https:%2F%2Fgithub.com%2Fhexpm%2Fhex&vcs_url=repository_url=git%2Bhttps:%2F%2Fgithub.com%2Fhexpm%2Fhex.git", "product": "hex", "programFiles": [ "lib/hex/remote_converger.ex", "lib/hex/mix.ex", "lib/hex/scm.ex" ], "programRoutines": [ { "name": "'Elixir.Hex.RemoteConverger':deps/2" }, { "name": "'Elixir.Hex.RemoteConverger':converge/2" }, { "name": "'Elixir.Hex.Mix':to_lock/1" }, { "name": "'Elixir.Hex.SCM':update/1" }, { "name": "'Elixir.Hex.SCM':checkout/1" } ], "repo": "https://github.com/hexpm/hex", "vendor": "hexpm", "versions": [ { "lessThan": "2.5.2", "status": "affected", "version": "0.6.0", "versionType": "semver" } ] }, { "collectionURL": "https://github.com", "cpes": [ "cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*" ], "defaultStatus": "unaffected", "modules": [ "'Elixir.Hex.RemoteConverger'", "'Elixir.Hex.Mix'", "'Elixir.Hex.SCM'" ], "packageName": "hexpm/hex", "packageURL": "pkg:github/hexpm/hex", "product": "hex", "programFiles": [ "lib/hex/remote_converger.ex", "lib/hex/mix.ex", "lib/hex/scm.ex" ], "programRoutines": [ { "name": "'Elixir.Hex.RemoteConverger':deps/2" }, { "name": "'Elixir.Hex.RemoteConverger':converge/2" }, { "name": "'Elixir.Hex.Mix':to_lock/1" }, { "name": "'Elixir.Hex.SCM':update/1" }, { "name": "'Elixir.Hex.SCM':checkout/1" } ], "repo": "https://github.com/hexpm/hex", "vendor": "hexpm", "versions": [ { "changes": [ { "at": "1b3e2ae8f0dd7273a2c2625b9e50b6c67c8568fb", "status": "unaffected" }, { "at": "72279a8e2004b32b20d8767ff010c117193dd02c", "status": "unaffected" } ], "lessThan": "*", "status": "affected", "version": "380f87054e1bc08ee13d2b5311bc01f98dad2fc6", "versionType": "git" } ] } ], "configurations": [ { "lang": "en", "supportingMedia": [ { "base64": false, "type": "text/html", "value": "
Affects projects whose dependency tree, directly or transitively, contains a package release whose registry metadata carries a crafted dependency app label, when dependencies are fetched with mix deps.get or mix deps.update. Packages on hex.pm are affected while hex.pm accepts such labels; packages on self-hosted repositories are affected when the repository operator signs such metadata.
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.
" }, { "base64": false, "type": "text/markdown", "value": "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.\n\nA 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/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.
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.
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.
beta.alpha with a requirement on beta whose app is ../../escape_marker.alpha, create ../escape_marker/canary.txt next to the project directory.mix deps.get. Hex prints * Updating ../../escape_marker (Hex package), deletes canary.txt and writes beta's files into ../escape_marker.app field with only a length check (255 codepoints) and copies it into the signed package registry resource when it differs from the dependency's package name.Hex.RemoteConverger.deps/2 returns the dependency's children with String.to_atom/1 of that label as the application name, and Hex.Mix.to_lock/1 writes it as the mix.lock key.Path.join(Mix.Project.deps_path(), Atom.to_string(app)) without validating the name.Hex.SCM.update/1 calls File.rm_rf!(dest) and then Hex.Tar.unpack!(path, dest), so a label containing .. segments deletes and repopulates a directory outside deps.mix.exs during mix deps.get, so this is reachable before any package code runs.