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-rc1 before 1.18.0.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Gleam | Gleam | 0.18.0-rc1 – < 1.18.0, v0.18.0-rc1-elixir – < v1.18.0-elixir, v0.18.0-rc1-erlang – < v1.18.0-erlang, v0.18.0-rc1-node – < v1.18.0-node, v0.18.0-rc1-node-slim – < v1.18.0-node-slim, v0.18.0-rc1-elixir-slim – < v1.18.0-elixir-slim, v0.18.0-rc1-erlang-slim – < v1.18.0-erlang-slim, v0.18.0-rc1-erlang-a… | 1.18.0 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | gleam | 1.18.1-1.1 | openSUSE-SU-2026:11462-1 |
| openSUSE Leap 16.0 | gleam | 1.18.1-bp160.1.1 | openSUSE-SU-2026:21557-1 |
Advisories 2
- openSUSE-SU-2026:21557-1 Security update for gleam SUSE / openSUSE Security Updates · Aug 12, 2026
- openSUSE-SU-2026:11462-1 gleam-1.18.1-1.1 on GA media SUSE / openSUSE Security Updates · Aug 7, 2026
References
- Insufficient Verification of Hex Package Metadata in Gleam vendor-advisory related
- EEF CNA record for CVE-2026-59247 related
- OSV record EEF-CVE-2026-59247 related
- https://github.com/hexpm/specifications/blob/main/registry-v2.md related
- Introducing commit 8447b78 in gleam-lang/gleam related
- Fix commit c9c0d48 in gleam-lang/gleam patch