Gleam up to 1.16.x compiler-cli/src/fs.rs gleam_files link following
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.1 | $0-$5k | 0.00 |
Summary
A vulnerability has been found in Gleam up to 1.16.x and classified as critical. Affected by this issue is the function gleam_files of the file compiler-cli/src/fs.rs. This manipulation causes link following.
This vulnerability is handled as CVE-2026-42795. It is possible to launch the attack on the local host. There is not any exploit available.
The affected component should be upgraded.
Details
A vulnerability has been found in Gleam up to 1.16.x and classified as critical. Affected by this vulnerability is the function gleam_files of the file compiler-cli/src/fs.rs. The manipulation with an unknown input leads to a link following vulnerability. The CWE definition for the vulnerability is CWE-59. The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:
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 until 1.17.0.
The weakness was released by Aly as GHSA-qhh5-fg4c-8gqc. It is possible to read the advisory at github.com. This vulnerability is known as CVE-2026-42795 since 04/29/2026. The exploitation appears to be easy. Attacking locally is a requirement. Technical details of the vulnerability are known, but there is no available exploit.
Upgrading to version 1.17.0, 1.17.0-elixir, 1.17.0-elixir-alpine, 1.17.0-elixir-slim, 1.17.0-erlang, 1.17.0-erlang-alpine, 1.17.0-erlang-slim, 1.17.0-node, 1.17.0-node-alpine, 1.17.0-node-slim or 1.17.0-scratch eliminates this vulnerability. Applying the patch 6435a5528b9ae0449e2f32be579641ec485f6866 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the vulnerability database at EUVD (EUVD-2026-33928). Be aware that VulDB is the high quality source for vulnerability data.
Product
Name
Version
License
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒
CVSSv3
VulDB Meta Base Score: 5.3VulDB Meta Temp Score: 5.1
VulDB Base Score: 5.3
VulDB Temp Score: 5.1
VulDB Vector: 🔒
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Link followingCWE: CWE-59
CAPEC: 🔒
ATT&CK: 🔒
Physical: Partially
Local: Yes
Remote: Partially
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Gleam 1.17.0/1.17.0-elixir/1.17.0-elixir-alpine/1.17.0-elixir-slim/1.17.0-erlang/1.17.0-erlang-alpine/1.17.0-erlang-slim/1.17.0-node/1.17.0-node-alpine/1.17.0-node-slim/1.17.0-scratch
Patch: 6435a5528b9ae0449e2f32be579641ec485f6866
Timeline
04/29/2026 CVE reserved06/02/2026 Advisory disclosed
06/02/2026 VulDB entry created
06/02/2026 VulDB entry last update
Sources
Advisory: GHSA-qhh5-fg4c-8gqcResearcher: Aly
Status: Confirmed
CVE: CVE-2026-42795 (🔒)
GCVE (CVE): GCVE-0-2026-42795
GCVE (VulDB): GCVE-100-367951
EUVD: 🔒
Entry
Created: 06/02/2026 17:19Updated: 06/02/2026 23:18
Changes: 06/02/2026 17:19 (71), 06/02/2026 23:18 (1)
Complete: 🔍
Cache ID: 216::103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.