CVE-2026-43965Path Traversal in build/packages/packages.toml Allows Arbitrary Directory Deletion
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.
What to do
None of the Linux distributions or Windows releases we track list an affected package for this CVE. Check the vendor-reported products below.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
What the vendor says
As published in the CVE record by EEF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Gleam: affected: v0.18.0-rc1-elixir to before v1.17.0-elixir, v0.18.0-rc1-erlang to before v1.17.0-erlang, v0.18.0-rc1-node to before v1.17.0-node, v0.18.0-rc1-node-slim to before v1.17.0-node-slim, v0.18.0-rc1-elixir-slim to before v1.17.0-elixir-slim, v0.18.0-rc1-erlang-slim to before v1.17.0-erlang-slim; fixed in
v1.17.0-elixir,v1.17.0-erlang,v1.17.0-node,v1.17.0-node-slim,v1.17.0-elixir-slim,v1.17.0-erlang-slim - Gleam: affected: 0.18.0-rc1 to before 1.17.0; fixed in
1.17.0 - Gleam: affected: ed7aec0484f10d60978b63788c8a6497590855ab to before 690ca069817bee5f77a28fc3e360627c1da19291; fixed in
690ca069817bee5f77a28fc3e360627c1da19291
Vendor advisories:
- https://github.com/gleam-lang/gleam/security/advisories/GHSA-jqvf-f6p2-wrv3 (vendor-advisory)
- https://github.com/gleam-lang/gleam/commit/690ca069817bee5f77a28fc3e360627c1da19291 (patch)
References
- https://github.com/gleam-lang/gleam/security/advisories/GHSA-jqvf-f6p2-wrv3
- https://cna.erlef.org/cves/CVE-2026-43965.html
- https://osv.dev/vulnerability/EEF-CVE-2026-43965
- https://github.com/gleam-lang/gleam/commit/ed7aec0484f10d60978b63788c8a6497590855ab
- https://github.com/gleam-lang/gleam/commit/690ca069817bee5f77a28fc3e360627c1da19291
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.