CVE-2026-103061Path traversal in Gleam via unvalidated package application names
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
Red Hat has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Red Hat Enterprise Linux 10 | firefox | Not affected | ||
| Red Hat Enterprise Linux 10 | thunderbird | Not affected | ||
| Red Hat Enterprise Linux 9 | firefox | Not affected | ||
| Red Hat Enterprise Linux 9 | firefox-x11 | Not affected | ||
| Red Hat Enterprise Linux 9 | thunderbird | Not affected | ||
| Red Hat Enterprise Linux 8 | firefox | Not affected | ||
| Red Hat Enterprise Linux 8 | mozjs60 | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | mozjs60-devel | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | thunderbird | Not affected | ||
| Red Hat Enterprise Linux 7 | firefox | Not affected |
What the vendor says
As published in the CVE record by EEF, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Gleam: 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; 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 - Gleam: affected: 0.32.4 to before 1.19.2; fixed in
1.19.2 - Gleam: affected: d13f27ee80aae7a521d2e9433c4deaf53f892574 and later; fixed in
54bbb2b98af1505b6eed93c45b1936fc76412e5c
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 _.
Vendor advisories:
- https://github.com/gleam-lang/gleam/security/advisories/GHSA-jhcr-c7qm-8589 (vendor-advisory)
- https://github.com/gleam-lang/gleam/commit/54bbb2b98af1505b6eed93c45b1936fc76412e5c (patch)
- https://github.com/gleam-lang/gleam/commit/d15c981fac6e533d70ac8ee89a6ef4dbf139adc3 (patch)
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/54bbb2b98af1505b6eed93c45b1936fc76412e5c
- https://github.com/gleam-lang/gleam/commit/d15c981fac6e533d70ac8ee89a6ef4dbf139adc3
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.