{"id":"CVE-2026-43965","aliases":["EEF-CVE-2026-43965","EUVD-2026-33926","GHSA-jqvf-f6p2-wrv3","openSUSE-SU-2026:10953-1","openSUSE-SU-2026:21143-1"],"status":"published","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-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 until 1.17.0.","severity":{"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","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00229,"percentile":0.13743,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-22"],"published":"2026-06-02T13:41:37Z","modified":"2026-10-28T02:30:32Z","affected":[{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"gleam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.17.0-1.1"}]}],"bundled":3},{"source":"osv","ecosystem":"openSUSE:Leap 16.0","package":"gleam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.17.0-bp160.1.1"}]}],"bundled":3}],"products":[{"vendor":"gleam","product":"gleam"}],"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/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"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-32685","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-42795","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-43965","tags":["web"]},{"url":"https://bugzilla.suse.com/1267396","tags":["report"]},{"url":"https://bugzilla.suse.com/1267397","tags":["report"]},{"url":"https://bugzilla.suse.com/1267398","tags":["report"]}],"sources":{"cve":[{"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-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 until 1.17.0.","status":"published","published":"2026-06-02T13:41:37.421Z","modified":"2026-09-08T01:05:35.928Z","cvss":[{"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","level":"medium","assessor":"cna"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T13:37:25.103021Z"}],"euvd":[{"id":"EUVD-2026-33926","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-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 until 1.17.0.","status":"published","published":"2026-06-02T13:41:37Z","modified":"2026-09-08T01:05:35Z","cvss":[{"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","level":"medium"}],"updated_at":"2026-11-02T17:28:30.317832Z"}],"nvd":[{"id":"CVE-2026-43965","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-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 until 1.17.0.","status":"published","published":"2026-06-02T14:16:54.053Z","modified":"2026-10-06T22:10:00.247Z","cvss":[{"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","level":"medium","assessor":"secondary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:12:22.022466Z"}],"osv":[{"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-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 until 1.17.0.","status":"published","published":"2026-06-02T13:41:37.421Z","modified":"2026-10-28T02:30:32.462309344Z","cvss":[{"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","level":"medium"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:45:04.820169Z"},{"id":"EEF-CVE-2026-43965","title":"Path Traversal in build/packages/packages.toml Allows Arbitrary Directory Deletion","description":"## Summary\n\nPath 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 until 1.17.0.","status":"published","published":"2026-06-02T13:41:37.421Z","modified":"2026-07-30T18:22:00.096303Z","cvss":[{"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","level":"medium"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:33.047032Z"},{"id":"openSUSE-SU-2026:10953-1","title":"gleam-1.17.0-1.1 on GA media","description":"These are all security issues fixed in the gleam-1.17.0-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-06-04T00:00:00Z","modified":"2026-06-05T10:45:56.543677446Z","updated_at":"2026-11-02T16:58:38.95195Z"},{"id":"openSUSE-SU-2026:21143-1","title":"Security update for gleam","description":"This update for gleam fixes the following issues:\n\nChanges in gleam:\n\n- Update to 1.17.0:\n  * Fixed security vulnerabilities:\n    - Restrict custom documentation page `path` and `source` values so\n      `gleam docs build` cannot escape the docs output directory or project\n      root (bsc#1267396, CVE-2026-32685)\n    - Restrict publication tarball creation so they cannot contain files\n      from outside the project root (bsc#1267397, CVE-2026-42795)\n    - Stricter deserialisation rules for files internal the build directory\n      to reject corrupted data (bsc#1267398, CVE-2026-43965)\n  * All features and bug fixes are extensively highlighted with\n    examples in the upstream blog post at\n    https://gleam.run/news/single-file-gleam-beam-programs-with-escript/\n    and changelog at\n    https://github.com/gleam-lang/gleam/blob/v1.17.0/CHANGELOG.md some of\n    the highlights include:\n    - Various JavaScript code generation fixes and optimization\n    - Various compiler error handling improvements\n    - Ability to use the `todo` keyword in constants\n    - Improved handling of Git monorepos during package management\n    - Ability to create escripts from Gleam programs\n    - Various language server improvements like reference highlighting,\n      record hovering and code actions\n\n- Update to 1.16.0:\n  * Changelog v1.16.0: https://gleam.run/news/javascript-source-maps/\n\n- Update to 1.15.1:\n  * Changelog v1.12.0: https://gleam.run/news/no-more-dependency-management-headaches/\n  * Changelog v1.13.0: https://gleam.run/news/formalising-external-apis/\n  * Changelog v1.14.0: https://gleam.run/news/the-happy-holidays-2025-release/\n  * Changelog v1.15.0: https://gleam.run/news/upgrading-hex-security/\n\n- Replace deprecated \"disabled\" mode with \"manual\" in _service\n- Update to 1.11.0:\n  * The displaying of internal types in HTML documentation has been\n\timproved\n  * A warning is now emitted when the same module is imported\n\tmultiple times into the same module with different aliases\n  * Fixed a bug where a bit array segment matching on a floating\n\tpoint number would match with NaN or Infinity on the JavaScript\n\ttarget\n  * https://github.com/gleam-lang/gleam/blob/v1.11.1/CHANGELOG.md\n\n- Update to 1.10.0:\n  * Changelog: https://gleam.run/news/global-rename-and-find-references/\n\n- skip unit tests that requires networking upon build\n\n- Update to 1.9.0:\n  * Changelog: https://gleam.run/news/hello-echo-hello-git/\n\n- Update to 1.8.1:\n * Fixed a metadata caching bug where accessors for opaque types\n   could sometimes be used in other modules. (Louis Pilfold)\n * Changelog: https://gleam.run/news/gleam-gets-rename-variable/\n\n- Update to 1.7.0:\n * Changelog: https://gleam.run/news/improved-performance-and-publishing/\n\n- Update to 1.6.3:\n * Fixed a bug where Gleam would be unable to compile to BEAM\n   bytecode on older versions of Erlang/OTP. (yoshi)\n\n- Update to 1.6.2:\n * Fixed a bug where patterns in use expressions would not be checked\n   to ensure that they were exhaustive. (Surya Rose)\n\n- Update to 1.6.1:\n * fix update use_manifest logic (Jason Sipula)\n * 1.6.0 Changelog: https://gleam.run/news/context-aware-compilation/\n","status":"published","published":"2026-06-23T09:40:09Z","modified":"2026-06-30T18:24:44.864495883Z","updated_at":"2026-11-02T16:58:41.885092Z"}]}}
