All vulnerabilities
CVE-2026-103061GHSA-jhcr-c7qm-8589

Path traversal in Gleam via unvalidated package application names

Gleam Gleam
CVSS
5.9Medium
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.40%Chance of exploitation activity in the next 30 days, higher than 33% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in1.19.2Fixed versionCVE List
Published12 Oct 2026Updated 16 Oct 2026CVE List

What fixes it

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in gleam-lang gleam allows a malicious package publisher to delete a directory outside the project's build directory when a developer builds a project.

A Hex package release's metadata carries an app field with the release's OTP application name. Gleam reads this field from the hex.pm release API when it downloads dependencies and uses it as the package's build directory name without validating it (hex_manifest_package in compiler-cli/src/dependencies.rs, ProjectPaths::build_directory_for_package). When a dependency fails to compile, Gleam deletes that directory with remove_dir_all. hex.pm didn't restrict the field to a directory name before 2026-10-12, so a publisher could set it to a value such as ../../../../target or an absolute path. When a project depends on such a release directly or transitively and the release fails to compile, gleam build, gleam check, gleam run, gleam test or gleam export deletes the directory the name resolves to. For a pure Gleam package no publisher code runs.

This issue affects gleam: from 0.32.4 before 1.19.2.

Text from CVE List

Affected versions 12

  • Gleamaffected: 0.32.4 before 1.19.2CVE List
  • Gleamaffected: v0.32.4-elixir before v1.19.2-elixirCVE List
  • Gleamaffected: v0.32.4-erlang before v1.19.2-erlangCVE List
  • Gleamaffected: v0.32.4-node before v1.19.2-nodeCVE List
  • Gleamaffected: v0.32.4-node-slim before v1.19.2-node-slimCVE List
  • Gleamaffected: v0.32.4-elixir-slim before v1.19.2-elixir-slimCVE List
  • Gleamaffected: v0.32.4-erlang-slim before v1.19.2-erlang-slimCVE List
  • Gleamaffected: v0.32.4-erlang-alpine before v1.19.2-erlang-alpineCVE List
  • Gleamaffected: v0.32.4-elixir-alpine before v1.19.2-elixir-alpineCVE List
  • Gleamaffected: v0.32.4-node-alpine before v1.19.2-node-alpineCVE List
  • Gleamaffected: v0.32.4-scratch before v1.19.2-scratchCVE List
  • Gleamaffected: d13f27ee80aae7a521d2e9433c4deaf53f892574 and laterCVE List

References 6