Vulnerability in Gleam's Hex package export
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-42795 has been found in Gleam's Hex package export.
Risk of unauthorized operations or information disclosure.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "Gleam's Hex package export CVE-2026-42795" on the vendor's site.
CVE-2026-42795 (Gleam's Hex package export) — CWE-59
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-59) exists in Gleam's Hex package export.
Check the vendor advisory for the affected versions of Gleam's Hex package export.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to the patched release per vendor advisory.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Audit SBOM/dependencies to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1
Identify exposureidentify
Audit SBOM/dependencies for affected components.資産台帳・SBOM・依存マニフェストで Gleam's Hex package export を使っているサービスとバージョンを洗い出す。
-
2
Post-deployment verificationverify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| GleamGleam |
≥ c82a2d83bd0c06cafdc196820deb3f89a9b3ff7c, < 6435a5528b9ae0449e2f32be579641ec485f6866→ 6435a5528b9ae0449e2f32be579641ec485f6866 |
6435a5528b9ae0449e2f32be579641ec485f6866 |
Original description The description as published by the source.
Summary
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.
Workarounds
- Avoid running
gleam publishorgleam export hex-tarballon untrusted projects - Review the contents of
src/andpriv/for unexpected symlinks before publishing - Run publishing commands in a restricted or isolated environment (e.g. containers)
Source: NIST National Vulnerability Database NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- web cna.erlef.org
- web osv.dev
- web ghcr.io
- web github.com
- web github.com