CVE-2026-103061
Received Received - Intake

Path Traversal in Gleam Compiler via Hex Metadata

Vulnerability report for CVE-2026-103061, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-12

Last updated on: 2026-10-12

Assigner: EEF

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-12
Last Modified
2026-10-12
Generated
2026-10-13
AI Q&A
2026-10-12
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 12 associated CPEs
Vendor Product Version / Range
Gleam Gleam 0.32.4
Gleam Gleam v0.32.4-elixir
Gleam Gleam v0.32.4-erlang
Gleam Gleam v0.32.4-node
Gleam Gleam v0.32.4-node-slim
Gleam Gleam v0.32.4-elixir-slim
Gleam Gleam v0.32.4-erlang-slim
Gleam Gleam v0.32.4-erlang-alpine
Gleam Gleam v0.32.4-elixir-alpine
Gleam Gleam v0.32.4-node-alpine
Gleam Gleam v0.32.4-scratch
Gleam Gleam d13f27ee80aae7a521d2e9433c4deaf53f892574

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a Path Traversal vulnerability in the Gleam programming language where malicious package publishers can set the OTP application name to a path traversal sequence like ../../../../target or an absolute path. When a dependency fails to compile, Gleam deletes the directory specified by this name using remove_dir_all, potentially removing files outside the project's build directory.

Detection Guidance

Check Gleam version with gleam --version. If between 0.32.4 and 1.19.1, the system is vulnerable. Review build logs for commands like gleam build, gleam check, gleam run, gleam test, or gleam export that may have deleted unexpected directories.

Impact Analysis

This vulnerability can lead to deletion of important files or directories outside the project's build directory when running Gleam commands like gleam build, gleam check, gleam run, gleam test, or gleam export. It affects developers and CI jobs using vulnerable Gleam versions (0.32.4 to 1.19.1).

Compliance Impact

This vulnerability could potentially impact compliance with GDPR and HIPAA by allowing unauthorized deletion of directories containing sensitive data. If a malicious package deletes critical directories (e.g., those storing personal or health information), it may violate data integrity and availability requirements under these regulations. The path traversal flaw enables deletion of arbitrary filesystem paths, which could compromise regulated data environments.

Mitigation Strategies

Upgrade Gleam to version 1.19.2 or later. Avoid building projects with vulnerable Gleam versions. Monitor filesystem changes during builds for unexpected directory deletions.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-103061. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart