CVE-2026-32146

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

State
Published
Severity
8.3 High
Published
Apr 11, 2026
Updated
Sep 8, 2026
Reserved
Mar 10, 2026

Read the record on cve.org

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 until 1.15.4.

Scores

CVSSScoreVectorSource
4.08.3 HighCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:H/VA:N/SC:H/SI:H/SA:HEEF
3.18.6 HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:Hredhat-SADP

Weaknesses

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Affected Products

ProductVersions
GleamGleam
  • 1.9.0-rc1 and laterAffectedfrom 1.15.4Not affected
GleamGleam
  • 1.9.0-rc1 and laterAffectedfrom 1.15.4Not affected
  • a4fde22445ab8e5cc79c2ff48971616cb570702c and laterAffectedfrom 92aae3913570e8d8962f6399404777d313045bfaNot affectedfrom 2dc0467f822c75de94697a912755d172928ee40aNot affected
GleamGleam
  • v1.9.0-rc1-elixir to before v1.15.4-elixirAffected
  • v1.9.0-rc1-erlang to before v1.15.4-erlangAffected
  • v1.9.0-rc1-node to before v1.15.4-nodeAffected
  • v1.9.0-rc1-node-slim to before v1.15.4-node-slimAffected
  • v1.9.0-rc1-elixir-slim to before v1.15.4-elixir-slimAffected
  • v1.9.0-rc1-erlang-slim to before v1.15.4-erlang-slimAffected
  • v1.9.0-rc1-erlang-alpine to before v1.15.4-erlang-alpineAffected
  • v1.9.0-rc1-elixir-alpine to before v1.15.4-elixir-alpineAffected
  • v1.9.0-rc1-node-alpine to before v1.15.4-node-alpineAffected
  • v1.9.0-rc1-scratch to before v1.15.4-scratchAffected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.