Improper Path Validation in Git Dependency Handling Allows Arbitrary File System Modification
Improper path validation vulnerability in the Gleam compiler's handling of git dependencies allows arbitrary file system modification during dependency download. Dependency 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. This 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. This issue affects Gleam from 1.9.0-rc1 until 1.15.4.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-32146
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 8 Nov 2026, 00:57 UTC · Revision 1
Source evidence
Improper Path Validation in Git Dependency Handling Allows Arbitrary File System Modification
core-osv · Original sourcePublished 11 Apr 2026, 12:59 UTC
Improper path validation vulnerability in the Gleam compiler's handling of git dependencies allows arbitrary file system modification during dependency download. Dependency 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. This 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. This issue affects Gleam from 1.9.0-rc1 until 1.15.4.
osv:CVE-2026-32146
Complete source record
{
"id": "221a79334001ecf982dbf8f591431ad62879484f85bd0fb4ec5e95cdeaed366b",
"url": "https://osv.dev/vulnerability/CVE-2026-32146",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Improper Path Validation in Git Dependency Handling Allows Arbitrary File System Modification",
"summary": "Improper path validation vulnerability in the Gleam compiler's handling of git dependencies allows arbitrary file system modification during dependency download. Dependency 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. This 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. This issue affects Gleam from 1.9.0-rc1 until 1.15.4.",
"evidence": "osv:CVE-2026-32146",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-32146",
"aliases": [
"CVE-2026-32146",
"EEF-CVE-2026-32146",
"GHSA-vq5j-55vx-wq8j"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "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"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/gleam-lang/gleam",
"type": "GIT",
"events": [
{
"introduced": "57132cfa27bfa43b8c9be7bc605cca50a9d3096c"
},
{
"fixed": "92aae3913570e8d8962f6399404777d313045bfa"
},
{
"fixed": "1aa5d8e594b0aa240bb213fce6ee19c65e6d5bcf"
},
{
"fixed": "2dc0467f822c75de94697a912755d172928ee40a"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:lpil:gleam:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "1.9.0"
},
{
"fixed": "1.15.4"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "1aa5d8e594b0aa240bb213fce6ee19c65e6d5bcf"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "2dc0467f822c75de94697a912755d172928ee40a"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v1.15.3",
"v1.15.2",
"v1.15.1",
"v1.15.0",
"v1.15.0-rc2",
"v1.15.0-rc1",
"v1.14.0",
"v1.14.0-rc3",
"v1.14.0-rc2",
"v1.14.0-rc1",
"v1.13.0",
"v1.13.0-rc2",
"v1.13.0-rc1",
"v1.12.0",
"v1.12.0-rc3",
"v1.12.0-rc2",
"v1.12.0-rc1",
"v1.11.1",
"v1.11.0",
"v1.11.0-rc2",
"v1.11.0-rc1",
"v1.10.0",
"v1.10.0-rc1",
"v1.9.1",
"v1.9.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-32146.json"
}
}
],
"modified": "2026-10-28T02:30:52.325836579Z",
"provider": "osv",
"references": [
"https://cna.erlef.org/cves/CVE-2026-32146.html",
"https://ghcr.io",
"https://github.com",
"https://osv.dev/vulnerability/EEF-CVE-2026-32146",
"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32146.json",
"https://access.redhat.com/security/cve/CVE-2026-32146",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32146.json",
"https://github.com/gleam-lang/gleam/security/advisories/GHSA-vq5j-55vx-wq8j",
"https://nvd.nist.gov/vuln/detail/CVE-2026-32146",
"https://bugzilla.redhat.com/show_bug.cgi?id=2457578",
"https://github.com/gleam-lang/gleam/commit/1aa5d8e594b0aa240bb213fce6ee19c65e6d5bcf",
"https://github.com/gleam-lang/gleam/commit/2dc0467f822c75de94697a912755d172928ee40a",
"https://github.com/gleam-lang/gleam"
],
"provider_metadata": {
"cwe_ids": [
"CWE-22"
],
"cna_assigner": "EEF",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32146.json"
}
},
"related_cves": [
{
"value": "CVE-2026-32146",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 521141,
"published_at": "2026-04-11T12:59:22.911+00:00"
}