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
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
Affected Vendors & Products
| 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 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. |