{"vuln_id":"CVE-2026-42795","aliases":["GHSA-qhh5-fg4c-8gqc"],"description":"Symlink following vulnerability in Gleam's Hex package export allows files outside the project root to be embedded in the generated package tarball.\n\nThe 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.\n\nAn 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.\n\nThis issue affects gleam: from 0.10.0-rc1 before 1.17.0.","published_at":"2026-06-02T14:16:53.883000Z","modified_at":"2026-11-20T06:17:27.530000Z","first_seen_at":"2026-11-21T19:15:46.262154Z","severity":"medium","severity_source":"nvd","cvss_score":5.1,"cvss_vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cwe":["CWE-59"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00199,"epss_percentile":0.09681,"nvd_status":"Deferred","enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-42795"},"matched_alias":null,"items":[{"id":3177,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-42795: 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 c…","summary":"Symlink following vulnerability in Gleam's Hex package export allows files outside the project root to be embedded in the generated package tarball.\n\nThe 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.\n\nAn 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.\n\nThis issue affects gleam: from 0.10.0-rc1 before 1.17.0.\n\nReferences:\nhttps://cna.erlef.org/cves/CVE-2026-42795.html\nhttps://github.com/gleam-lang/gleam/commit/6435a5528b9ae0449e2f32be579641ec485f6866\nhttps://github.com/gleam-lang/gleam/commit/c82a2d83bd0c06cafdc196820deb3f89a9b3ff7c\nhttps://github.com/gleam-lang/gleam/security/advisories/GHSA-qhh5-fg4c-8gqc\nhttps://osv.dev/vulnerability/EEF-CVE-2026-42795\nhttps://github.com/gleam-lang/gleam/security/advisories/GHSA-qhh5-fg4c-8gqc","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42795","published_at":"2026-06-02T14:16:53.883000Z","updated_at":"2026-11-20T06:17:27.530000Z","fetched_at":"2026-11-21T19:15:31.478778Z","severity":"medium","cvss_score":5.1,"epss":0.00199,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-42795","vuln_ids":["CVE-2026-42795","GHSA-QHH5-FG4C-8GQC"],"tags":["CWE-59"],"cluster_id":3227,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/3177","html":"https://vulnwatch.ve1ve2.com/item/3177"}}]}