Skip to content
Threat Brief

← All advisories

CVE-2026-103061

Medium 5.9No known exploitationFix available

Path traversal in Gleam via unvalidated package application names

Record last updated

CVSS score

5.9

Medium on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

0.4%

Higher than 35% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

Not in the KEV catalog

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.

Weakness: CWE-22

Patching and mitigation

Patch status
Fix available (source: CVE record (EEF))
Fix documented (source date)
Vendor solution
Upgrade Gleam to 1.19.2 or later. Gleam then rejects a hex.pm release whose OTP application name, or the application name it gives a dependency, isn't a lowercase letter followed by lowercase letters, digits and _.
Mitigation
None documented
Vendor guidance
github.com (opens in a new tab)

Affected products

VendorProductAffected versionsFixed inPer
GleamGleamfrom 0.32.4 before 1.19.21.19.2CVE Program
GleamGleamfrom v0.32.4-elixir before v1.19.2-elixirv1.19.2-elixirCVE Program
GleamGleamfrom v0.32.4-elixir-alpine before v1.19.2-elixir-alpinev1.19.2-elixir-alpineCVE Program
GleamGleamfrom v0.32.4-elixir-slim before v1.19.2-elixir-slimv1.19.2-elixir-slimCVE Program
GleamGleamfrom v0.32.4-erlang before v1.19.2-erlangv1.19.2-erlangCVE Program
GleamGleamfrom v0.32.4-erlang-alpine before v1.19.2-erlang-alpinev1.19.2-erlang-alpineCVE Program
GleamGleamfrom v0.32.4-erlang-slim before v1.19.2-erlang-slimv1.19.2-erlang-slimCVE Program
GleamGleamfrom v0.32.4-node before v1.19.2-nodev1.19.2-nodeCVE Program
GleamGleamfrom v0.32.4-node-alpine before v1.19.2-node-alpinev1.19.2-node-alpineCVE Program
GleamGleamfrom v0.32.4-node-slim before v1.19.2-node-slimv1.19.2-node-slimCVE Program
GleamGleamfrom v0.32.4-scratch before v1.19.2-scratchv1.19.2-scratchCVE Program
GleamGleamd13f27ee80aae7a521d2e9433c4deaf53f892574Not documentedCVE Program

Timeline

  1. Disclosure

    CVE record published by EEF

    Source: CVE Program (opens in a new tab)

  2. Patch

    Fix documented by CVE record (EEF)

    Source: CVE record (EEF) (opens in a new tab)

Vendor guidance and references