CVE-2026-43965: Gleam path traversal in dependency management allows arbitrary directory deletion

CVE-2026-43965 · Severity: info · CVSS 5.6 · Published 2026-06-02

Gleam is a programming language and toolchain for the Erlang ecosystem. A vulnerability in its dependency management system allows a malicious project to delete arbitrary folders on a developer's computer. If a user runs the standard dependency download command on a compromised project, the tool can be tricked into recursively deleting sensitive data, source code, or system directories without warning.

Quick answers

Is CVE-2026-43965 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-43965 being exploited in the wild.
How severe is CVE-2026-43965?
Informational severity, with a CVSS score of 5.6, published 2 June 2026.
Which products and versions are affected?
Gleam Gleam >= 0.18.0-rc1, < 1.17.0.
Is there a fix for CVE-2026-43965?
A patch was published on 2026-06-02T13:33:16Z: Patch committed to main branch Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-43965 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-43965?
Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A path traversal vulnerability exists in Gleam's compiler-cli within the dependency management logic. The function `LocalPackages::read_from_disc` reads package keys from `build/packages/packages.toml` without validation. These keys are passed to `paths.build_packages_package()`, which joins them with the project build directory, and subsequently to `fs::delete_directory` (calling `remove_dir_all`). Because the keys can contain absolute paths or relative traversal sequences (e.g., `../`), an attacker can specify any directory on the filesystem for recursive deletion. Exploitation occurs when a victim runs `gleam deps download` on a project containing a malicious, committed `packages.toml` file. The issue is fixed in version 1.17.0.

Affected products

  • Gleam Gleam >= 0.18.0-rc1, < 1.17.0

Timeline

  • 2026-05-05: other: Patch authored
  • 2026-06-02: patched: Patch committed to main branch
  • 2026-06-02: disclosed: CVE published
  • 2026-06-02: advisory: GitHub Security Advisory published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.