{"id":"CVE-2026-32146","published":"2026-04-11T12:59:22Z","modified":"2026-11-20T05:59:35Z","title":"Improper Path Validation in Git Dependency Handling Allows Arbitrary File System Modification","vendor":"Gleam","product":"Gleam","tier":"tail","description":{"text":"Improper 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 before 1.15.4 and from 1.16.0-rc1 before 1.16.0-rc2.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.3,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00264,"percentile":0.18683,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/gleam-lang/gleam/security/advisories/GHSA-vq5j-55vx-wq8j","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-32146.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-32146","tags":["related"]},{"url":"https://github.com/gleam-lang/gleam/commit/1aa5d8e594b0aa240bb213fce6ee19c65e6d5bcf","tags":["patch"]},{"url":"https://github.com/gleam-lang/gleam/commit/a4fde22445ab8e5cc79c2ff48971616cb570702c","tags":["related"]},{"url":"https://github.com/gleam-lang/gleam/commit/2dc0467f822c75de94697a912755d172928ee40a","tags":["patch"]},{"url":"https://github.com/gleam-lang/gleam/commit/92aae3913570e8d8962f6399404777d313045bfa","tags":["patch"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-32146","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2457578","tags":["issue-tracking","x_refsource_REDHAT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32146.json","tags":["x_sadp-csaf-vex"]}],"priority":{"score":9.5,"factors":[{"name":"EPSS percentile","points":3.74},{"name":"CVSS severity","points":5.81}]},"vendorSlug":"gleam","affectedVersions":[{"vendor":"Gleam","product":"Gleam","versions":[">= v1.9.0-rc1-elixir, < v1.15.4-elixir",">= v1.9.0-rc1-erlang, < v1.15.4-erlang",">= v1.9.0-rc1-node, < v1.15.4-node",">= v1.9.0-rc1-node-slim, < v1.15.4-node-slim",">= v1.9.0-rc1-elixir-slim, < v1.15.4-elixir-slim",">= v1.9.0-rc1-erlang-slim, < v1.15.4-erlang-slim",">= v1.9.0-rc1-erlang-alpine, < v1.15.4-erlang-alpine",">= v1.9.0-rc1-elixir-alpine, < v1.15.4-elixir-alpine",">= v1.9.0-rc1-node-alpine, < v1.15.4-node-alpine",">= v1.9.0-rc1-scratch, < v1.15.4-scratch"]},{"vendor":"Gleam","product":"Gleam","versions":[">= 1.9.0-rc1, < 1.15.4",">= 1.16.0-rc1, < 1.16.0-rc2"]},{"vendor":"Gleam","product":"Gleam","versions":[">= a4fde22445ab8e5cc79c2ff48971616cb570702c"]}],"fixedVersions":[{"vendor":"Gleam","product":"Gleam","versions":["2dc0467f822c75de94697a912755d172928ee40a","92aae3913570e8d8962f6399404777d313045bfa"]}],"solutions":{"items":["Upgrade to Gleam 1.15.4 or later. Both patches must be applied: the original incomplete fix (1aa5d8e594b0aa240bb213fce6ee19c65e6d5bcf, backported as 55bb36e6d7febfbbc48c4d001e0ae13eb0312d78 to 1.15) and the follow-up fix (2dc0467f822c75de94697a912755d172928ee40a, backported as 92aae3913570e8d8962f6399404777d313045bfa to 1.15). Gleam 1.15.4 includes both."],"from":"CVE.org CNA","provenance":"source"},"workarounds":{"items":["* Avoid using untrusted git dependencies, especially without pinning to a specific commit SHA * Review dependency trees carefully, including transitive git dependencies * Run dependency resolution commands in a restricted or isolated environment (e.g. containers)"],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-139","name":"Relative Path Traversal"},{"id":"CAPEC-597","name":"Absolute Path Traversal"}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-13T17:44:39.043742Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-21680","exploited":false,"provenance":"source"}}