# CVE-2026-103061: Path traversal in Gleam via unvalidated package application names

- Severity: Medium 5.9 (CVSS:4.0, scored by EEF) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.50%, higher than 44% of CVEs (2026-12-01)
- Published: 2026-10-12T18:23:41.507Z
- Modified: 2026-11-25T06:30:03.681Z
- Also known as: EEF-CVE-2026-103061, GHSA-jhcr-c7qm-8589
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: EEF

## Description

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in gleam-lang gleam allows a malicious package publisher to delete a directory outside the project's build directory when a developer builds a project.

A Hex package release's metadata carries an app field with the release's OTP application name. Gleam reads this field from the hex.pm release API when it downloads dependencies and uses it as the package's build directory name without validating it (hex_manifest_package in compiler-cli/src/dependencies.rs, ProjectPaths::build_directory_for_package). When a dependency fails to compile, Gleam deletes that directory with remove_dir_all. hex.pm didn't restrict the field to a directory name before 2026-10-12, so a publisher could set it to a value such as ../../../../target or an absolute path. When a project depends on such a release directly or transitively and the release fails to compile, gleam build, gleam check, gleam run, gleam test or gleam export deletes the directory the name resolves to. For a pure Gleam package no publisher code runs.

This issue affects gleam: from 0.32.4 before 1.19.2.

(As written by CVE List.)

## Affected

- gleam-lang/gleam: from v0.32.4-elixir before v1.19.2-elixir; from v0.32.4-erlang before v1.19.2-erlang; from v0.32.4-node before v1.19.2-node; from v0.32.4-node-slim before v1.19.2-node-slim; from v0.32.4-elixir-slim before v1.19.2-elixir-slim; from v0.32.4-erlang-slim before v1.19.2-erlang-slim; from v0.32.4-erlang-alpine before v1.19.2-erlang-alpine; from v0.32.4-elixir-alpine before v1.19.2-elixir-alpine; from v0.32.4-node-alpine before v1.19.2-node-alpine; from v0.32.4-scratch before v1.19.2-scratch; from d13f27ee80aae7a521d2e9433c4deaf53f892574 before *
- gleam: from 0.32.4 before 1.19.2
- https://github.com/gleam-lang/gleam: from d13f27ee80aae7a521d2e9433c4deaf53f892574 before 54bbb2b98af1505b6eed93c45b1936fc76412e5c; before d15c981fac6e533d70ac8ee89a6ef4dbf139adc3

## Every score

- EEF: CVSS:4.0 5.9 Medium `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- Erlang Ecosystem Foundation: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/gleam-lang/gleam/security/advisories/GHSA-jhcr-c7qm-8589> (advisory, related, vendor-advisory)
- <https://cna.erlef.org/cves/CVE-2026-103061.html> (related, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-103061> (related)
- <https://github.com/gleam-lang/gleam/commit/d13f27ee80aae7a521d2e9433c4deaf53f892574> (related, web)
- <https://github.com/gleam-lang/gleam/commit/54bbb2b98af1505b6eed93c45b1936fc76412e5c> (fix, patch)
- <https://github.com/gleam-lang/gleam/commit/d15c981fac6e533d70ac8ee89a6ef4dbf139adc3> (fix, patch)

## Sources

- CVE List: [CVE-2026-103061](https://www.cve.org/CVERecord?id=CVE-2026-103061), CVE Terms of Use, modified 2026-11-20
- Erlang Ecosystem Foundation: [EEF-CVE-2026-103061](https://osv.dev/vulnerability/EEF-CVE-2026-103061), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-103061](https://nvd.nist.gov/vuln/detail/CVE-2026-103061), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-103061 · Whole record: https://cve.day/CVE-2026-103061.json · Rebuilt by cve.day 2026-11-25T22:59:43.655Z
