Skip to content
Heist/ feed
Back to feed
HighFix available

erlang-hex — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2026-96612

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/, 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.

Products
erlang-hex
Affected versions
2.0.6-2, 2.4.2-1, 2.4.2-2, 2.5.1-1, 2.5.1-2, 2.5.3-1, 2.5.3-2
Fixed versions
2.5.3-2
CVEs
CVE-2026-96612
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 23:09 UTC · Revision 1

Source evidence

DEBIAN-CVE-2026-96612

core-osv · Original source

Published 12 Oct 2026, 16:17 UTC

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/, 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.

osv:DEBIAN-CVE-2026-96612

erlang-hex

Fixed versions: Not specified

erlang-hex

Fixed versions: 2.5.3-2

Complete source record
{
  "id": "922e05e18d4c667e5c293cadb9f84f9d4f667f34f0ed0916c7f9f39ad95df3c4",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-96612",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2026-96612",
    "summary": "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/, 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.",
    "evidence": "osv:DEBIAN-CVE-2026-96612",
    "products": [
      {
        "name": {
          "value": "erlang-hex",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.0.6-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.4.2-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.4.2-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.1-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.1-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.3-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.3-2",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "erlang-hex",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.5.3-2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "2.0.6-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.4.2-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.4.2-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.5.1-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.5.1-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.5.3-1",
            "evidence": "/affected/1/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "DEBIAN-CVE-2026-96612",
      "aliases": [
        "DEBIAN-CVE-2026-96612"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "erlang-hex",
            "purl": "pkg:deb/debian/erlang-hex?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "2.0.6-2",
            "2.4.2-1",
            "2.4.2-2",
            "2.5.1-1",
            "2.5.1-2",
            "2.5.3-1",
            "2.5.3-2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-96612.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.5.3-2"
                }
              ]
            }
          ],
          "package": {
            "name": "erlang-hex",
            "purl": "pkg:deb/debian/erlang-hex?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "2.0.6-2",
            "2.4.2-1",
            "2.4.2-2",
            "2.5.1-1",
            "2.5.1-2",
            "2.5.3-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-96612.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-23T17:47:36.341440101Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-96612"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2026-96612"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-96612",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 417893,
  "published_at": "2026-10-12T16:17:07.637+00:00"
}