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

- Severity: High 7.6 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2026-07-29T14:24:55.499Z
- Modified: 2026-11-25T06:30:26.234Z
- Also known as: EEF-CVE-2026-59247, GHSA-4vvc-458m-r82g
- Weaknesses: CWE-345
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: EEF

## 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.

(As written by CVE List.)

## Affected

- gleam-lang/gleam: from v0.18.0-rc1-elixir before v1.18.0-elixir; from v0.18.0-rc1-erlang before v1.18.0-erlang; from v0.18.0-rc1-node before v1.18.0-node; from v0.18.0-rc1-node-slim before v1.18.0-node-slim; from v0.18.0-rc1-elixir-slim before v1.18.0-elixir-slim; from v0.18.0-rc1-erlang-slim before v1.18.0-erlang-slim; from v0.18.0-rc1-erlang-alpine before v1.18.0-erlang-alpine; from v0.18.0-rc1-elixir-alpine before v1.18.0-elixir-alpine; from v0.18.0-rc1-node-alpine before v1.18.0-node-alpine; from v0.18.0-rc1-scratch before v1.18.0-scratch; from 8447b78cc844ff4aec44eea23dbd68d1fea11f11 before c9c0d48c123c8abae6db8dd61b25ccb427ed3d35
- gleam: from 0.18.0-rc1 before 1.18.0
- https://github.com/gleam-lang/gleam: from 8447b78cc844ff4aec44eea23dbd68d1fea11f11 before c9c0d48c123c8abae6db8dd61b25ccb427ed3d35

## Every score

- EEF: CVSS:4.0 7.6 High `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`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`

## References

- <https://github.com/gleam-lang/gleam/security/advisories/GHSA-4vvc-458m-r82g> (advisory, related, vendor-advisory)
- <https://cna.erlef.org/cves/CVE-2026-59247.html> (related, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-59247> (related)
- <https://github.com/hexpm/specifications/blob/main/registry-v2.md> (related, web)
- <https://github.com/gleam-lang/gleam/commit/8447b78cc844ff4aec44eea23dbd68d1fea11f11> (related, web)
- <https://github.com/gleam-lang/gleam/commit/c9c0d48c123c8abae6db8dd61b25ccb427ed3d35> (fix, patch)

## Sources

- CVE List: [CVE-2026-59247](https://www.cve.org/CVERecord?id=CVE-2026-59247), CVE Terms of Use, modified 2026-11-20
- Erlang Ecosystem Foundation: [EEF-CVE-2026-59247](https://osv.dev/vulnerability/EEF-CVE-2026-59247), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-59247](https://nvd.nist.gov/vuln/detail/CVE-2026-59247), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-59247 · Whole record: https://cve.day/CVE-2026-59247.json · Rebuilt by cve.day 2026-11-25T22:59:30.443Z
