CVE-2026-59247 Details
Description
Insufficient Verification of Data Authenticity vulnerability in Gleam allows an adversary in the middle to substitute forged Hex package contents during dependency resolution. During 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. An 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. Only 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.
A vulnerability allowing an adversary in the middle to substitute forged Hex package contents during dependency resolution has been identified in Gleam versions 0.18.0 prior to 1.18.0. This issue arises because Gleam fetches package metadata from the signature-verified Hex repository but later requests unsigned data from the Hex API, which can be manipulated. An attacker who can intercept TLS and modify both the API response and the corresponding package tarball can introduce a malicious package that passes integrity checks, leading to potential execution of harmful code.
Users can upgrade to Gleam version 1.18.0, which addresses this vulnerability by ensuring that package metadata is sourced from the verified Hex repository and by rejecting release records that lack a checksum.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 29, 2026CISA-ADP
Assessed Jul 29, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://cna.erlef.org/cves/CVE-2026-59247.html | EEF | AdvisoryBundle |
| https://github.com/gleam-lang/gleam/commit/c9c0d48c123c8abae6db8dd61b25ccb427ed3d35 | EEF | Source CodeVendor |
| https://github.com/gleam-lang/gleam/security/advisories/GHSA-4vvc-458m-r82g | EEF | AdvisoryRemedyVendor |
| https://github.com/hexpm/specifications/blob/main/registry-v2.md | EEF | Not Applicable |
| https://osv.dev/vulnerability/EEF-CVE-2026-59247 | EEF | AdvisoryBundle |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-345 | Insufficient Verification of Data Authenticity | EEF |
Affected Products
| Product | Versions |
|---|---|
| Gleam | >= 0.18.0, < 1.18.0 (semver) 8447b78cc844ff4aec44eea23db68d1fea11f11 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 8, 2026 | CVE Modified | EEF |
| Jul 29, 2026 | CVE Modified | CISA-ADP |
| Jul 29, 2026 | New CVE Received | EEF |
Volerion