Improper Path Validation in Git Dependency Handling Allows Arbitrary File System Modification
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 1.15.4, v1.15.4-elixir, v1.15.4-erlang, v1.15.4-node, v1.15.4-node-slim, and 6 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: poc
- Automatable: no
- Technical impact: partial
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.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: poc · Automatable: no · Technical impact: partial
- Record last updated
Affected versions
- gleam
From 1.9.0-rc1 · fixed in 1.15.4
- gleam-lang/gleam
From 1.9.0-rc1 · fixed in 1.15.4
- gleam-lang/gleam
From v1.9.0-rc1-elixir · fixed in v1.15.4-elixir; From v1.9.0-rc1-erlang · fixed in v1.15.4-erlang; From v1.9.0-rc1-node · fixed in v1.15.4-node; From v1.9.0-rc1-node-slim · fixed in v1.15.4-node-slim; From v1.9.0-rc1-elixir-slim · fixed in v1.15.4-elixir-slim; From v1.9.0-rc1-erlang-slim · fixed in v1.15.4-erlang-slim; From v1.9.0-rc1-erlang-alpine · fixed in v1.15.4-erlang-alpine; From v1.9.0-rc1-elixir-alpine · fixed in v1.15.4-elixir-alpine; From v1.9.0-rc1-node-alpine · fixed in v1.15.4-node-alpine; From v1.9.0-rc1-scratch · fixed in v1.15.4-scratch