← CVE Intelligence

CVE-2026-32146

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

Description (CNA)

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.

Affected (CNA)

Vendor / productVersions
Gleam / Gleamaffected 1.9.0-rc1 before *
Gleam / Gleamaffected 1.9.0-rc1 before *; affected a4fde22445ab8e5cc79c2ff48971616cb570702c before *
Gleam / Gleamaffected v1.9.0-rc1-elixir before v1.15.4-elixir; affected v1.9.0-rc1-erlang before v1.15.4-erlang; affected v1.9.0-rc1-node before v1.15.4-node; affected v1.9.0-rc1-node-slim before v1.15.4-node-slim; affected v1.9.0-rc1-elixir-slim before v1.15.4-elixir-slim; affected v1.9.0-rc1-erlang-slim before v1.15.4-erlang-slim; affected v1.9.0-rc1-erlang-alpine before v1.15.4-erlang-alpine; affected v1.9.0-rc1-elixir-alpine before v1.15.4-elixir-alpine; affected v1.9.0-rc1-node-alpine before v1.15.4-node-alpine; affected v1.9.0-rc1-scratch before v1.15.4-scratch

CWE

CWE-22

References

ADP enrichment

CISA-ADP

No English description supplied.

No references supplied.

redhat-SADP

A flaw was found in the Gleam compiler. A malicious direct or transitive git dependency can exploit an improper path validation vulnerability in the Gleam compiler's handling of git dependencies during dependency download. This allows for arbitrary file system modification, including the deletion and creation of directories outside the intended dependency directory, potentially leading to data loss. In certain environments, this could be further leveraged to achieve arbitrary code execution.