CVE-2026-103061
Medium 5.9No known exploitationFix availablePath traversal in Gleam via unvalidated package application names
Record last updated
CVSS score
Medium on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 35% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
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.
Weakness: CWE-22
Patching and mitigation
- Patch status
- Fix available (source: CVE record (EEF))
- Fix documented (source date)
- Vendor solution
- Upgrade Gleam to 1.19.2 or later. Gleam then rejects a hex.pm release whose OTP application name, or the application name it gives a dependency, isn't a lowercase letter followed by lowercase letters, digits and _.
- Mitigation
- None documented
- Vendor guidance
- github.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| Gleam | Gleam | from 0.32.4 before 1.19.2 | 1.19.2 | CVE Program |
| Gleam | Gleam | from v0.32.4-elixir before v1.19.2-elixir | v1.19.2-elixir | CVE Program |
| Gleam | Gleam | from v0.32.4-elixir-alpine before v1.19.2-elixir-alpine | v1.19.2-elixir-alpine | CVE Program |
| Gleam | Gleam | from v0.32.4-elixir-slim before v1.19.2-elixir-slim | v1.19.2-elixir-slim | CVE Program |
| Gleam | Gleam | from v0.32.4-erlang before v1.19.2-erlang | v1.19.2-erlang | CVE Program |
| Gleam | Gleam | from v0.32.4-erlang-alpine before v1.19.2-erlang-alpine | v1.19.2-erlang-alpine | CVE Program |
| Gleam | Gleam | from v0.32.4-erlang-slim before v1.19.2-erlang-slim | v1.19.2-erlang-slim | CVE Program |
| Gleam | Gleam | from v0.32.4-node before v1.19.2-node | v1.19.2-node | CVE Program |
| Gleam | Gleam | from v0.32.4-node-alpine before v1.19.2-node-alpine | v1.19.2-node-alpine | CVE Program |
| Gleam | Gleam | from v0.32.4-node-slim before v1.19.2-node-slim | v1.19.2-node-slim | CVE Program |
| Gleam | Gleam | from v0.32.4-scratch before v1.19.2-scratch | v1.19.2-scratch | CVE Program |
| Gleam | Gleam | d13f27ee80aae7a521d2e9433c4deaf53f892574 | Not documented | CVE Program |
Timeline
Disclosure
CVE record published by EEF
Source: CVE Program (opens in a new tab)
Patch
Fix documented by CVE record (EEF)
Vendor guidance and references
- Fix commit 54bbb2b in gleam-lang/gleam (opens in a new tab)patch
- Fix commit d15c981 in gleam-lang/gleam (opens in a new tab)patch
- GitHub Advisory (opens in a new tab)related, vendor-advisory
- EEF CNA record for CVE-2026-103061 (opens in a new tab)related
- Introducing commit d13f27e in gleam-lang/gleam (opens in a new tab)related
- OSV record EEF-CVE-2026-103061 (opens in a new tab)related