CVE-2026-43965 Details
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 until 1.17.0.
A path traversal vulnerability has been identified in Gleam's dependency management system, specifically in versions 0.18.0-rc1 prior to 1.17.0. This vulnerability allows for arbitrary directory deletion through malicious content in the 'build/packages/packages.toml' file. The issue arises because package keys from this file are read without validation and used to construct filesystem paths. These paths can then be exploited to delete directories outside the intended 'build/packages/' directory. Both absolute paths and relative traversal sequences are accepted as package keys, enabling the deletion of arbitrary directories on the victim's system.
Users can upgrade to Gleam version 1.17.0 or later, where this vulnerability has been patched.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 2, 2026CISA-ADP
Assessed Jun 2, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/gleam-lang/gleam/security/advisories/GHSA-jqvf-f6p2-wrv3 | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://cna.erlef.org/cves/CVE-2026-43965.html | EEF | AdvisoryBundle |
| https://github.com/gleam-lang/gleam/commit/690ca069817bee5f77a28fc3e360627c1da19291 | EEF | Source CodeVendor |
| https://github.com/gleam-lang/gleam/security/advisories/GHSA-jqvf-f6p2-wrv3 | EEF | AdvisoryExploitRemedyVendor |
| https://osv.dev/vulnerability/EEF-CVE-2026-43965 | EEF | AdvisoryBundle |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | EEF |
Affected Products
| Product | Versions |
|---|---|
| Gleam | >= 0.18.0-rc1, < 1.17.0 (semver) |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 8, 2026 | CVE Modified | CISA-ADP |
| Sep 8, 2026 | CVE Modified | EEF |
| Jul 22, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | EEF |
| Jun 2, 2026 | CVE Modified | CISA-ADP |
| Jun 2, 2026 | New CVE Received | EEF |
Volerion