{"affected":[{"ranges":[{"events":[{"introduced":"a4fde22445ab8e5cc79c2ff48971616cb570702c"},{"fixed":"1aa5d8e594b0aa240bb213fce6ee19c65e6d5bcf"},{"fixed":"55bb36e6d7febfbbc48c4d001e0ae13eb0312d78"}],"repo":"https://github.com/gleam-lang/gleam","type":"GIT"}]}],"aliases":["GHSA-vq5j-55vx-wq8j","CVE-2026-32146"],"credits":[{"name":"John Downey","type":"REMEDIATION_DEVELOPER"},{"name":"Louis Pilfold","type":"ANALYST"},{"name":"Jonatan Männchen / EEF","type":"COORDINATOR"}],"database_specific":{"capec_ids":["CAPEC-139","CAPEC-597"],"cpe_ids":[],"cwe_ids":["CWE-22"]},"details":"## Summary\n\nImproper path validation vulnerability in the Gleam compiler's handling of git dependencies allows arbitrary file system modification during dependency download.\n\nDependency names from gleam.toml and manifest.toml are incorporated into filesystem paths without sufficient validation or confinement to the intended dependency directory, allowing attacker-controlled paths (via relative traversal such as ../ or absolute paths) to target filesystem locations outside that directory. When resolving git dependencies (e.g. via gleam deps download), the computed path is used for filesystem operations including directory deletion and creation.\n\nThis vulnerability occurs during the dependency resolution and download phase, which is generally expected to be limited to fetching and preparing dependencies within a confined directory. A malicious direct or transitive git dependency can exploit this issue to delete and overwrite arbitrary directories outside the intended dependency directory, including attacker-chosen absolute paths, potentially causing data loss. In some environments, this may be further leveraged to achieve code execution, for example by overwriting git hooks or shell configuration files.\n\nThis issue affects Gleam from 1.9.0-rc1 until 1.15.3 and 1.16.0-rc1.\n\n## Workaround\n\n* Avoid using untrusted git dependencies, especially without pinning to a specific commit SHA\n* Review dependency trees carefully, including transitive git dependencies\n* Run dependency resolution commands in a restricted or isolated environment (e.g. containers)\n\n## Configuration\n\nThe project must use git-based dependencies (direct or transitive). Projects that exclusively use Hex dependencies are not affected.\n\nProjects that exclusively use trusted or personally controlled git dependencies, or dependencies pinned to verified commit SHAs, are not exposed.","id":"EEF-CVE-2026-32146","modified":"2026-04-11T12:59:22.911Z","published":"2026-04-11T12:59:22.911Z","references":[{"type":"ADVISORY","url":"https://github.com/gleam-lang/gleam/security/advisories/GHSA-vq5j-55vx-wq8j"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-32146.html"},{"type":"FIX","url":"https://github.com/gleam-lang/gleam/commit/1aa5d8e594b0aa240bb213fce6ee19c65e6d5bcf"},{"type":"FIX","url":"https://github.com/gleam-lang/gleam/commit/55bb36e6d7febfbbc48c4d001e0ae13eb0312d78"}],"related":[],"schema_version":"1.7.3","severity":[{"score":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H","type":"CVSS_V4"}],"summary":"Improper Path Validation in Git Dependency Handling Allows Arbitrary File System Modification","upstream":[]}