CVE-2026-42795
published medium CVSS 4.0 · 5.1Symlink Following in Hex Package Export Allows Embedding Files Outside Project Root
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Gleam | — | gleam-lang/gleamGleam · v0.10.0-rc1-elixir to < v1.17.0-elixir · v0.10.0-rc1-erlang to < v1.17.0-erlang · v0.10.0-rc1-node to < v1.17.0-node · v0.10.0-rc1-node-slim to < v1.17.0-node-slim · v0.10.0-rc1-elixir-slim to < v1.17.0-elixir-slim · v0.10.0-rc1-erlang-slim to < v1.17.0-erlang-slim · v0.10.0-rc1-erlang-alpine to < v1.17.0-erlang-alpine · v0.10.0-rc1-elixir-alpine to < v1.17.0-elixir-alpine · v0.10.0-rc1-node-alpine to < v1.17.0-node-alpine · v0.10.0-rc1-scratch to < v1.17.0-scratch · Other versions: unaffected | Affected | Not stated | EEF |
| Gleam | — | gleamGleam · 0.10.0-rc1 to < 1.17.0 · Other versions: unaffected | Affected | Not stated | EEF |
| Gleam | — | gleam-lang/gleamGleam · c82a2d83bd0c06cafdc196820deb3f89a9b3ff7c to < 6435a5528b9ae0449e2f32be579641ec485f6866 · Other versions: unaffected | Affected | Not stated | EEF |
| SUSE / openSUSE | openSUSE-Leap-16.0 | gleamaarch64 | Advisory build | 1.17.0-bp160.1.1 | OPENSUSE-SU-2026:21143-1 |
| SUSE / openSUSE | openSUSE-Leap-16.0 | gleamx86_64 | Advisory build | 1.17.0-bp160.1.1 | OPENSUSE-SU-2026:21143-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gleamaarch64 | Advisory build | 1.17.0-1.1 | OPENSUSE-SU-2026:10953-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gleamppc64le | Advisory build | 1.17.0-1.1 | OPENSUSE-SU-2026:10953-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | gleams390x | Advisory build | 1.17.0-1.1 | OPENSUSE-SU-2026:10953-1 |
Show 1 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | gleamx86_64 | Advisory build | 1.17.0-1.1 | OPENSUSE-SU-2026:10953-1 |
Description
Symlink following vulnerability in Gleam's Hex package export allows files outside the project root to be embedded in the generated package tarball. The file collection helpers (gleam_files, native_files, private_files) in compiler-cli/src/fs.rs use follow_links(true) when walking publishable directories such as src/ and priv/. The collected paths are added to the package archive via add_path_to_tar in compiler-cli/src/publish.rs without verifying that the resolved target remains within the project root. A symlink placed under a publishable directory will cause gleam export hex-tarball or gleam publish to embed the contents of the symlink target into the generated Hex package. An attacker with write access to the project repository can place a symlink in src/ or priv/ pointing to an arbitrary file. When a maintainer or CI pipeline runs gleam publish or gleam export hex-tarball, local files readable by the publisher (such as secrets, tokens, or SSH keys) are silently embedded into the published package artifact. This issue affects gleam: from 0.10.0-rc1 before 1.17.0.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.1 / 10
- Severity
- medium
- Provider
- EEF · cna
- Vector string
- CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Gleam | Gleam | v0.10.0-rc1-elixir to < v1.17.0-elixir (affected · other)v0.10.0-rc1-erlang to < v1.17.0-erlang (affected · other)v0.10.0-rc1-node to < v1.17.0-node (affected · other)v0.10.0-rc1-node-slim to < v1.17.0-node-slim (affected · other)v0.10.0-rc1-elixir-slim to < v1.17.0-elixir-slim (affected · other)v0.10.0-rc1-erlang-slim to < v1.17.0-erlang-slim (affected · other)v0.10.0-rc1-erlang-alpine to < v1.17.0-erlang-alpine (affected · other)v0.10.0-rc1-elixir-alpine to < v1.17.0-elixir-alpine (affected · other)v0.10.0-rc1-node-alpine to < v1.17.0-node-alpine (affected · other)v0.10.0-rc1-scratch to < v1.17.0-scratch (affected · other)Default: unaffected | EEF · cna |
| Gleam | Gleam | 0.10.0-rc1 to < 1.17.0 (affected · semver)Default: unaffected | EEF · cna |
| Gleam | Gleam | c82a2d83bd0c06cafdc196820deb3f89a9b3ff7c to < 6435a5528b9ae0449e2f32be579641ec485f6866 (affected · git)Default: unaffected | EEF · cna |
Weaknesses
1- CWE-59 CWE-59 Improper Link Resolution Before File Access
References
5- EEF CNA record for CVE-2026-42795 https://cna.erlef.org/cves/CVE-2026-42795.html
- Fix commit 6435a55 in gleam-lang/gleam https://github.com/gleam-lang/gleam/commit/6435a5528b9ae0449e2f32be579641ec485f6866
- Introducing commit c82a2d8 in gleam-lang/gleam https://github.com/gleam-lang/gleam/commit/c82a2d83bd0c06cafdc196820deb3f89a9b3ff7c
- Symlink dereference during Hex package export can leak files outside the project root https://github.com/gleam-lang/gleam/security/advisories/GHSA-qhh5-fg4c-8gqc
- OSV record EEF-CVE-2026-42795 https://osv.dev/vulnerability/EEF-CVE-2026-42795
Provider assertions
2EEF · cna
Symlink Following in Hex Package Export Allows Embedding Files Outside Project Root
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- bf375dcacd1aaaf89c2c57a388cb92d6b7ae2227f9e23b671c6cb5cf7c2552a3
- Ingested
- 20 Nov 2026, 06:18:48 UTC
- Source record
- Official CVE record