CVE-2026-32146 Improper Path Validation in Git Dependency Handling Allows Arbitrary File System Modification
A malicious git dependency can exploit improper path validation in the Gleam compiler to delete or overwrite arbitrary files, potentially leading to code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-32146?
CVE-2026-32146 is a high-severity path traversal vulnerability in Gleam, published on 11 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-22
Which versions are affected by CVE-2026-32146?
It affects 1 product.
Products include Lpil Gleam.
How do I fix CVE-2026-32146?
No fix has been published for CVE-2026-32146 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-32146 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-32146 exists.
Sources
Also known as EEF-CVE-2026-32146, GHSA-vq5j-55vx-wq8j.