Path traversal in Gleam via unvalidated package application names
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-22 and the CVSS impact.
Summary
Gleam from 0.32.4 before 1.19.2 uses a Hex package's app field as its build directory name without validating it. A malicious package publisher can set that field to a path outside the build directory (CWE-22), so a build that fails to compile for such a dependency deletes an arbitrary directory on the developer's machine.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Gleam | Gleam | 0.32.4 to before 1.19.2 | 1.19.2 | Patch available | CNA |
| Gleam | Gleam | v0.32.4-elixir to before v1.19.2-elixir; v0.32.4-erlang to before v1.19.2-erlang; v0.32.4-node to before v1.19.2-node; v0.32.4-node-slim to before v1.19.2-node-slim; v0.32.4-elixir-slim to before v1.19.2-elixir-slim; v0.32.4-erlang-slim to before v1.19.2-erlang-slim; v0.32.4-erlang-alpine to before v1.19.2-erlang-alpine; v0.32.4-elixir-alpine to before v1.19.2-elixir-alpine; v0.32.4-node-alpine to before v1.19.2-node-alpine; v0.32.4-scratch to before v1.19.2-scratch | v1.19.2-elixir, v1.19.2-erlang, v1.19.2-node, v1.19.2-node-slim, v1.19.2-elixir-slim, v1.19.2-erlang-slim, v1.19.2-erlang-alpine, v1.19.2-elixir-alpine, v1.19.2-node-alpine, v1.19.2-scratch | Patch available | CNA |
- Gleam VendorGleam Affected 0.32.4 to before 1.19.2 Fixed in 1.19.2 Patch available CNA
- Gleam VendorGleam Affected v0.32.4-elixir to before v1.19.2-elixir; v0.32.4-erlang to before v1.19.2-erlang; v0.32.4-node to before v1.19.2-node; v0.32.4-node-slim to before v1.19.2-node-slim; v0.32.4-elixir-slim to before v1.19.2-elixir-slim; v0.32.4-erlang-slim to before v1.19.2-erlang-slim; v0.32.4-erlang-alpine to before v1.19.2-erlang-alpine; v0.32.4-elixir-alpine to before v1.19.2-elixir-alpine; v0.32.4-node-alpine to before v1.19.2-node-alpine; v0.32.4-scratch to before v1.19.2-scratch Fixed in v1.19.2-elixir, v1.19.2-erlang, v1.19.2-node, v1.19.2-node-slim, v1.19.2-elixir-slim, v1.19.2-erlang-slim, v1.19.2-erlang-alpine, v1.19.2-elixir-alpine, v1.19.2-node-alpine, v1.19.2-scratch Patch available CNA
CPE names CNA · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:gleam-lang:gleam:*:*:*:*:*:*:*:* | — | — | — |
- cpe:2.3:a:gleam-lang:gleam:*:*:*:*:*:*:*:* Versions — — ·—
Remediation
Upgrade Gleam to 1.19.2 or to the fixed image tags v1.19.2-elixir, v1.19.2-erlang, v1.19.2-node, v1.19.2-node-slim, v1.19.2-elixir-slim, v1.19.2-erlang-slim, v1.19.2-erlang-alpine, v1.19.2-elixir-alpine, v1.19.2-node-alpine and v1.19.2-scratch. Red Hat lists Red Hat Enterprise Linux 8 as affected with no fix available.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA Gleam (Gleam) Fixed in 1.19.2
- Fix · CNA Gleam (Gleam) Fixed in v1.19.2-elixir, v1.19.2-erlang, v1.19.2-node, v1.19.2-node-slim, v1.19.2-elixir-slim, v1.19.2-erlang-slim, v1.19.2-erlang-alpine, v1.19.2-elixir-alpine, v1.19.2-node-alpine, v1.19.2-scratch
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 8 | Affected | No fix yet |
Not affected: 4 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-12 Threatist record created from CVE-2026-103061
- 2026-10-13 Affected versions changed · Red Hat
- 2026-10-13 CVSS score added · Red Hat
- 2026-10-13 Priority changed: MEDIUM → LOW
- 2026-10-16 CISA SSVC decision points changed
References
More Gleam vulnerabilities
- TI-2026-32010 Path Traversal in build/packages/packages.toml Allows Arbitrary Directory Deletion CVSS 4.0MEDIUM 5.6
- TI-2026-31015 Symlink Following in Hex Package Export Allows Embedding Files Outside Project Root CVSS 4.0MEDIUM 5.1
- TI-2026-25177 Path Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write CVSS 4.0MEDIUM 4.6
Sources
- CVE-2026-103061 · CVE Program
- CVE-2026-103061 · NVD
- FIRST EPSS
- CVE-2026-103061 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences