CVE-2026-43965

Path Traversal in build/packages/packages.toml Allows Arbitrary Directory Deletion

MEDIUM
5.6
CVSS Score
Published: June 2, 2026 at 01:41 PM UTC
Updated: October 6, 2026 at 10:10 PM UTC
2 products affected across 2 vendorsGleamGleam

Using Gleam by Gleam?

Get instant alerts when new vulnerabilities affect Gleam - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.6
Exploit prediction
EPSS 0.2%
SSVC
PoC

Description

Path traversal vulnerability in Gleam's dependency management allows arbitrary directory deletion via malicious build/packages/packages.toml content. Package keys read from build/packages/packages.toml by LocalPackages::read_from_disc are passed without validation to paths.build_packages_package(), which constructs a filesystem path by joining the project build directory with the attacker-controlled key. The resulting path is then passed to fs::delete_directory (which calls remove_dir_all). No check is performed to ensure the path remains within the intended build/packages/ directory. Both absolute paths and relative traversal sequences (e.g. ../) are accepted as package keys, allowing deletion of arbitrary directories. An attacker who can cause a victim to run gleam deps download on a project containing a malicious build/packages/packages.toml (e.g. by committing the normally-gitignored file to a repository) can cause arbitrary directories on the victim's system to be recursively deleted. This issue affects Gleam from 0.18.0-rc1 until 1.17.0.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

0.18.0-rc1 ≤ v < 1.17.0
Affected range stops below 1.17.0, so it looks safe — our inference, not a vendor statement
0.18.0-rc1 ≤ v < 1.17.0v0.18.0-rc1-elixir ≤ v < v1.17.0-elixirv0.18.0-rc1-elixir-alpine ≤ v < v1.17.0-elixir-alpinev0.18.0-rc1-elixir-slim ≤ v < v1.17.0-elixir-slimv0.18.0-rc1-erlang ≤ v < v1.17.0-erlangv0.18.0-rc1-erlang-alpine ≤ v < v1.17.0-erlang-alpinev0.18.0-rc1-erlang-slim ≤ v < v1.17.0-erlang-slimv0.18.0-rc1-node ≤ v < v1.17.0-nodev0.18.0-rc1-node-alpine ≤ v < v1.17.0-node-alpinev0.18.0-rc1-node-slim ≤ v < v1.17.0-node-slimv0.18.0-rc1-scratch ≤ v < v1.17.0-scratch0.18.0-rc10.18.0-rc1-elixir0.18.0-rc1-elixir-alpine0.18.0-rc1-elixir-slim0.18.0-rc1-erlang0.18.0-rc1-erlang-alpine0.18.0-rc1-erlang-slim0.18.0-rc1-node0.18.0-rc1-node-alpine0.18.0-rc1-node-slim0.18.0-rc1-scratched7aec0484f10d60978b63788c8a6497590855ab
Vendor states this is fixed in 690ca069817bee5f77a28fc3e360627c1da19291 (fixed)
Affected range stops below 1.17.0, so it looks safe — our inference, not a vendor statement
Affected range stops below v1.17.0-elixir, so it looks safe — our inference, not a vendor statement
Affected range stops below v1.17.0-elixir-alpine, so it looks safe — our inference, not a vendor statement
Affected range stops below v1.17.0-elixir-slim, so it looks safe — our inference, not a vendor statement
Affected range stops below v1.17.0-erlang, so it looks safe — our inference, not a vendor statement
Affected range stops below v1.17.0-erlang-alpine, so it looks safe — our inference, not a vendor statement
Affected range stops below v1.17.0-erlang-slim, so it looks safe — our inference, not a vendor statement
Affected range stops below v1.17.0-node, so it looks safe — our inference, not a vendor statement
Affected range stops below v1.17.0-node-alpine, so it looks safe — our inference, not a vendor statement
Affected range stops below v1.17.0-node-slim, so it looks safe — our inference, not a vendor statement
Affected range stops below v1.17.0-scratch, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.6MEDIUMEEF
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-22

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card