CVE-2026-43965
Medium 5.6No known exploitationFix availablePath Traversal in build/packages/packages.toml Allows Arbitrary Directory Deletion
Record last updated
CVSS score
Medium on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 14% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
Description
Path traversal vulnerability in Gleam's dependency management allows arbitrary directory deletion via malicious build/packages/packages.toml content. Package keys read from build/packages/packages.toml by LocalPackages::read_from_disc are passed without validation to paths.build_packages_package(), which constructs a filesystem path by joining the project build directory with the attacker-controlled key. The resulting path is then passed to fs::delete_directory (which calls remove_dir_all). No check is performed to ensure the path remains within the intended build/packages/ directory. Both absolute paths and relative traversal sequences (e.g. ../) are accepted as package keys, allowing deletion of arbitrary directories. An attacker who can cause a victim to run gleam deps download on a project containing a malicious build/packages/packages.toml (e.g. by committing the normally-gitignored file to a repository) can cause arbitrary directories on the victim's system to be recursively deleted. This issue affects gleam: from 0.18.0-rc1 before 1.17.0.
Weakness: CWE-22
Patching and mitigation
- Patch status
- Fix available (source: CVE record (EEF))
- Fix documented (source date)
- 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.18.0-rc1 before 1.17.0 | 1.17.0 | CVE Program |
| Gleam | Gleam | from ed7aec0484f10d60978b63788c8a6497590855ab before 690ca069817bee5f77a28fc3e360627c1da19291 | 690ca069817bee5f77a28fc3e360627c1da19291 | CVE Program |
| Gleam | Gleam | from v0.18.0-rc1-elixir before v1.17.0-elixir | v1.17.0-elixir | CVE Program |
| Gleam | Gleam | from v0.18.0-rc1-elixir-alpine before v1.17.0-elixir-alpine | v1.17.0-elixir-alpine | CVE Program |
| Gleam | Gleam | from v0.18.0-rc1-elixir-slim before v1.17.0-elixir-slim | v1.17.0-elixir-slim | CVE Program |
| Gleam | Gleam | from v0.18.0-rc1-erlang before v1.17.0-erlang | v1.17.0-erlang | CVE Program |
| Gleam | Gleam | from v0.18.0-rc1-erlang-alpine before v1.17.0-erlang-alpine | v1.17.0-erlang-alpine | CVE Program |
| Gleam | Gleam | from v0.18.0-rc1-erlang-slim before v1.17.0-erlang-slim | v1.17.0-erlang-slim | CVE Program |
| Gleam | Gleam | from v0.18.0-rc1-node before v1.17.0-node | v1.17.0-node | CVE Program |
| Gleam | Gleam | from v0.18.0-rc1-node-alpine before v1.17.0-node-alpine | v1.17.0-node-alpine | CVE Program |
| Gleam | Gleam | from v0.18.0-rc1-node-slim before v1.17.0-node-slim | v1.17.0-node-slim | CVE Program |
| Gleam | Gleam | from v0.18.0-rc1-scratch before v1.17.0-scratch | v1.17.0-scratch | 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 690ca06 in gleam-lang/gleam (opens in a new tab)patch
- Path Traversal in build/packages/packages.toml allows arbitrary directory deletion (opens in a new tab)related, vendor-advisory
- EEF CNA record for CVE-2026-43965 (opens in a new tab)related
- Introducing commit ed7aec0 in gleam-lang/gleam (opens in a new tab)related
- OSV record EEF-CVE-2026-43965 (opens in a new tab)related