{"affected":[{"ranges":[{"events":[{"introduced":"8447b78cc844ff4aec44eea23dbd68d1fea11f11"},{"fixed":"c9c0d48c123c8abae6db8dd61b25ccb427ed3d35"}],"repo":"https://github.com/gleam-lang/gleam","type":"GIT"}]}],"aliases":["GHSA-4vvc-458m-r82g","CVE-2026-59247"],"credits":[{"name":"John Downey","type":"FINDER"},{"name":"John Downey","type":"REMEDIATION_DEVELOPER"},{"name":"Louis Pilfold","type":"REMEDIATION_REVIEWER"}],"database_specific":{"capec_ids":["CAPEC-94","CAPEC-185"],"cpe_ids":["cpe:2.3:a:gleam-lang:gleam:*:*:*:*:*:*:*:*"],"cwe_ids":["CWE-345"]},"details":"## Summary\n\nInsufficient Verification of Data Authenticity vulnerability in Gleam allows an adversary in the middle to substitute forged Hex package contents during dependency resolution.\n\nDuring dependency resolution Gleam fetches package metadata from the signature-verified Hex repository, which covers each release's dependency requirements and SHA-256 outer\\_checksum. After resolving versions, gleam\\_cli::dependencies::lookup\\_package makes a second request to the unsigned Hex API through gleam\\_core::hex::get\\_package\\_release and records the outer\\_checksum and dependency names from that JSON response into manifest.toml, instead of the values from the verified repository metadata. The Hex repository signature does not cover the API response.\n\nAn adversary in the middle who can intercept TLS with a certificate trusted by the Gleam process (for example a TLS-inspecting proxy using a CA in the operating system trust store or added through GLEAM\\_CACERTS\\_PATH), and who can modify both the API release response and the corresponding repository tarball, can supply a package archive with a matching forged checksum without the Hex repository signing key. Gleam verifies the forged tarball against the forged checksum, accepts it, and extracts it as a dependency source, resulting in loss of integrity of the downloaded package contents.\n\nOnly projects that resolve or update Hex dependencies are affected, which happens when the manifest is missing, a dependency is added or updated, or dependency requirements change. Builds that reuse an unchanged, known-good manifest.toml continue to verify tarballs against its pinned checksum. This issue affects gleam: from 0.18.0 before 1.18.0.","id":"EEF-CVE-2026-59247","modified":"2026-07-29T14:24:55.499Z","published":"2026-07-29T14:24:55.499Z","references":[{"type":"ADVISORY","url":"https://github.com/gleam-lang/gleam/security/advisories/GHSA-4vvc-458m-r82g"},{"type":"WEB","url":"https://cna.erlef.org/cves/CVE-2026-59247.html"},{"type":"FIX","url":"https://github.com/gleam-lang/gleam/commit/c9c0d48c123c8abae6db8dd61b25ccb427ed3d35"},{"type":"WEB","url":"https://github.com/hexpm/specifications/blob/main/registry-v2.md"}],"related":[],"schema_version":"1.7.3","severity":[{"score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","type":"CVSS_V4"}],"summary":"Insufficient verification of Hex package metadata in Gleam","upstream":[]}