# CVE-2026-59247: Gleam insufficient verification of Hex package metadata

Source: https://junglewise.ai/threats/cve-2026-59247-gleam-insufficient-verification-of-hex-package-metadata  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-29. Updated: 2026-07-29  
License: CC BY 4.0 with a link back

CVE-2026-59247 · Severity: info · CVSS 7.6 · Published 2026-07-29

Gleam is a programming language and build tool that automatically downloads software libraries (packages) from the Hex repository. A security flaw in how Gleam verifies these downloads allows a sophisticated attacker to intercept the connection and replace legitimate code with malicious software. This could lead to the compromise of a developer's machine or production servers when new dependencies are added or updated.

## Quick answers

**Is CVE-2026-59247 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59247 being exploited in the wild.

**How severe is CVE-2026-59247?** Informational severity, with a CVSS score of 7.6, published 29 July 2026.

**Which products and versions are affected?** Gleam-lang Gleam from 0.18.0 before 1.18.0.

**Is there a fix for CVE-2026-59247?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-59247 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-59247?** Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A vulnerability exists in the Gleam CLI dependency resolution process (specifically in gleam_cli::dependencies::lookup_package). While Gleam initially fetches signed metadata, it performs a subsequent request to an unsigned Hex API and prioritizes the checksum from this unsigned response when creating the manifest.toml file. An attacker capable of intercepting TLS traffic (e.g., via a trusted proxy or compromised CA) can provide a forged API response and a matching malicious tarball. Because Gleam validates the malicious tarball against the forged checksum rather than the signed repository metadata, it accepts the compromised package. This affects projects during dependency resolution or updates; projects with existing, unchanged manifests are not impacted.

## Affected products

- Gleam-lang Gleam from 0.18.0 before 1.18.0

## Timeline

- 2026-07-29: disclosed: Vulnerability published by Erlang Ecosystem Foundation CNA

## References

- [https://gleam.run/](https://gleam.run/)
- [https://github.com/](https://github.com/)
- [https://ghcr.io/](https://ghcr.io/)
- [https://cna.erlef.org/cves/CVE-2026-59247.html](https://cna.erlef.org/cves/CVE-2026-59247.html)
- [https://github.com/gleam-lang/gleam/commit/c9c0d48c123c8abae6db8dd61b25ccb427ed3d35](https://github.com/gleam-lang/gleam/commit/c9c0d48c123c8abae6db8dd61b25ccb427ed3d35)
- [https://github.com/gleam-lang/gleam/security/advisories/GHSA-4vvc-458m-r82g](https://github.com/gleam-lang/gleam/security/advisories/GHSA-4vvc-458m-r82g)
- [https://github.com/hexpm/specifications/blob/main/registry-v2.md](https://github.com/hexpm/specifications/blob/main/registry-v2.md)
