CVE-2026-32146
JSON

8.3high

Improper Path Validation in Git Dependency Handling Allows Arbitrary File System Modification

Severity
8.3high CVSS:4.0 by EEF
Exploit likelihood
0.32% (higher than 26% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
EEF
Also known as
EEF-CVE-2026-32146GHSA-vq5j-55vx-wq8j

Description

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 before 1.15.4 and from 1.16.0-rc1 before 1.16.0-rc2.

Affected

Product or packageVersionsReported by
gleam-lang/gleamfrom v1.9.0-rc1-elixir before v1.15.4-elixir, from v1.9.0-rc1-erlang before v1.15.4-erlang, from v1.9.0-rc1-node before v1.15.4-node, from v1.9.0-rc1-node-slim before v1.15.4-node-slim, from v1.9.0-rc1-elixir-slim before v1.15.4-elixir-slim, from v1.9.0-rc1-erlang-slim before v1.15.4-erlang-slim, from v1.9.0-rc1-erlang-alpine before v1.15.4-erlang-alpine, from v1.9.0-rc1-elixir-alpine before v1.15.4-elixir-alpine and 13 moreCVE List
gleamfrom 1.9.0-rc1 before 1.15.4, from 1.16.0-rc1 before 1.16.0-rc2CVE List
firefoxNot specifiedCVE List
gjsNot specifiedCVE List
thunderbirdNot specifiedCVE List
mozjs60Not specifiedCVE List
https://github.com/gleam-lang/gleamfrom a4fde22445ab8e5cc79c2ff48971616cb570702c before 2dc0467f822c75de94697a912755d172928ee40a, before 92aae3913570e8d8962f6399404777d313045bfaErlang Ecosystem Foundation
lpil gleamfrom 1.9.0 before 1.15.4NVD

All scores

EEF8.3high CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H
redhat-SADP8.6high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Erlang Ecosystem FoundationNot scored CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-22

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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 before 1.15.4 and from 1.16.0-rc1 before 1.16.0-rc2.

Erlang Ecosystem Foundation

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 before 1.15.4 and from 1.16.0-rc1 before 1.16.0-rc2.

Workarounds

  • 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)

Configurations

The project must use git-based dependencies (direct or transitive), or the victim must run gleam deps download on a repository with a malicious manifest.toml lockfile. Projects that exclusively use Hex dependencies and do not clone untrusted repositories are not affected.

Projects that exclusively use trusted or personally controlled git dependencies, or dependencies pinned to verified commit SHAs, are not exposed.

Solutions

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.

References

https://github.com/gleam-lang/gleam/security/advisories/GHSA-vq5j-55vx-wq8jadvisory, exploit, related, vendor-advisory
https://cna.erlef.org/cves/CVE-2026-32146.htmlrelated, third-party-advisory, web
https://osv.dev/vulnerability/EEF-CVE-2026-32146related, third-party-advisory
https://github.com/gleam-lang/gleam/commit/1aa5d8e594b0aa240bb213fce6ee19c65e6d5bcffix, patch
https://github.com/gleam-lang/gleam/commit/a4fde22445ab8e5cc79c2ff48971616cb570702crelated, web
https://github.com/gleam-lang/gleam/commit/2dc0467f822c75de94697a912755d172928ee40afix, patch
https://github.com/gleam-lang/gleam/commit/92aae3913570e8d8962f6399404777d313045bfafix, patch
https://access.redhat.com/security/cve/CVE-2026-32146vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2457578issue-tracking
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32146.json

Sources

SourceRecordLicence
CVE ListCVE-2026-32146 changed 2026-11-20CVE Terms of Use
Erlang Ecosystem FoundationEEF-CVE-2026-32146 changed 2026-11-25CC-BY-4.0
NVDCVE-2026-32146 changed 2026-11-20Public domain