{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-43965","id":"CVE-2026-43965","title":"Path Traversal in build/packages/packages.toml Allows Arbitrary Directory Deletion","description":"Path traversal vulnerability in Gleam's dependency management allows arbitrary directory deletion via malicious build/packages/packages.toml content.\n\nPackage 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-control","descriptionLong":"Path traversal vulnerability in Gleam's dependency management allows arbitrary directory deletion via malicious build/packages/packages.toml content.\n\nPackage 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.\n\nAn 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.\n\nThis issue affects gleam: from 0.18.0-rc1 before 1.17.0.","published":"2026-06-02T13:41:37.421Z","updated":"2026-11-19T07:45:35.926318263Z","reserved":"2026-05-04T18:23:25.573Z","status":"Deferred","rejected":false,"assigner":"EEF","metric":{"version":"4.0","score":5.6,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"medium","source":"EEF"},"metrics":[{"version":"4.0","score":5.6,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"medium","source":"EEF"},{"version":"4.0","score":5.6,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/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","rating":"medium","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db"},{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"unrated","source":"OSV"}],"rating":"medium","products":["Gleam"],"affectedProducts":[{"vendor":"Gleam","product":"Gleam","defaultStatus":"unaffected","versions":[{"lessThan":"1.17.0","status":"affected","version":"0.18.0-rc1","versionType":"semver"}],"platforms":[]},{"vendor":"Gleam","product":"Gleam","defaultStatus":"unaffected","versions":[{"lessThan":"v1.17.0-elixir","status":"affected","version":"v0.18.0-rc1-elixir","versionType":"other"},{"lessThan":"v1.17.0-erlang","status":"affected","version":"v0.18.0-rc1-erlang","versionType":"other"},{"lessThan":"v1.17.0-node","status":"affected","version":"v0.18.0-rc1-node","versionType":"other"},{"lessThan":"v1.17.0-node-slim","status":"affected","version":"v0.18.0-rc1-node-slim","versionType":"other"},{"lessThan":"v1.17.0-elixir-slim","status":"affected","version":"v0.18.0-rc1-elixir-slim","versionType":"other"},{"lessThan":"v1.17.0-erlang-slim","status":"affected","version":"v0.18.0-rc1-erlang-slim","versionType":"other"},{"lessThan":"v1.17.0-erlang-alpine","status":"affected","version":"v0.18.0-rc1-erlang-alpine","versionType":"other"},{"lessThan":"v1.17.0-elixir-alpine","status":"affected","version":"v0.18.0-rc1-elixir-alpine","versionType":"other"},{"lessThan":"v1.17.0-node-alpine","status":"affected","version":"v0.18.0-rc1-node-alpine","versionType":"other"},{"lessThan":"v1.17.0-scratch","status":"affected","version":"v0.18.0-rc1-scratch","versionType":"other"}],"platforms":[]},{"vendor":"Gleam","product":"Gleam","defaultStatus":"unaffected","versions":[{"lessThan":"690ca069817bee5f77a28fc3e360627c1da19291","status":"affected","version":"ed7aec0484f10d60978b63788c8a6497590855ab","versionType":"git"}],"platforms":[]}],"packages":[],"cwes":["CWE-22"],"aliases":["EEF-CVE-2026-43965","GHSA-jqvf-f6p2-wrv3"],"references":[{"url":"https://github.com/gleam-lang/gleam/security/advisories/GHSA-jqvf-f6p2-wrv3","tags":["vendor-advisory","related","exploit","advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-43965.html","tags":["related","web"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-43965","tags":["related","web"]},{"url":"https://github.com/gleam-lang/gleam/commit/ed7aec0484f10d60978b63788c8a6497590855ab","tags":["related","fix"]},{"url":"https://github.com/gleam-lang/gleam/commit/690ca069817bee5f77a28fc3e360627c1da19291","tags":["patch","fix"]},{"url":"https://ghcr.io","tags":["web"]},{"url":"https://github.com","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/43xxx/CVE-2026-43965.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43965","tags":["advisory"]},{"url":"https://github.com/gleam-lang/gleam","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00229,"epssPercentile":0.13838,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-43965","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43965","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-43965","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-43965","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}