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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.6
- **CVSS:** 7.6 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: Passive; Confidentiality impact: High; Integrity impact: High; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.20% (percentile 5, 2026-11-26)
- **CWE:** CWE-345
- **Published:** 2026-07-29T14:24:55.499Z
- **Modified:** 2026-11-20T06:17:33.530Z

## Who should check

- Anyone running Gleam \>= 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-alpine, \< v1.18.0-erlang-alpine; \>= v0.18.0-rc1-elixir-alpine, \< v1.18.0-elixir-alpine; \>= v0.18.0-rc1-node-alpine, \< v1.18.0-node-alpine; \>= v0.18.0-rc1-scratch, \< v1.18.0-scratch
- Anyone running Gleam \>= 0.18.0-rc1, \< 1.18.0
- Anyone running Gleam \>= 8447b78cc844ff4aec44eea23dbd68d1fea11f11, \< c9c0d48c123c8abae6db8dd61b25ccb427ed3d35

## 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 and fixed versions

- Gleam: \>= 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-alpine, \< v1.18.0-erlang-alpine; \>= v0.18.0-rc1-elixir-alpine, \< v1.18.0-elixir-alpine; \>= v0.18.0-rc1-node-alpine, \< v1.18.0-node-alpine; \>= v0.18.0-rc1-scratch, \< v1.18.0-scratch (cvelist)
- Gleam: \>= 0.18.0-rc1, \< 1.18.0 (cvelist)
- Gleam: \>= 8447b78cc844ff4aec44eea23dbd68d1fea11f11, \< c9c0d48c123c8abae6db8dd61b25ccb427ed3d35 (cvelist)

## Mitigation

- Upgrade Gleam to 1.18.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-59247. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-59247.md
Affected: Gleam >= 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-alp…
Fixed in: Gleam 1.18.0

Steps:
1. Search this machine and project for Gleam: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-59247 being exploited?

There is no confirmed exploitation: CVE-2026-59247 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.20% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-59247?

High: CVSS 7.6 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-59247?

Gleam \>= 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-alpine, \< v1.18.0-erlang-alpine; \>= v0.18.0-rc1-elixir-alpine, \< v1.18.0-elixir-alpine; \>= v0.18.0-rc1-node-alpine, \< v1.18.0-node-alpine; \>= v0.18.0-rc1-scratch, \< v1.18.0-scratch; Gleam \>= 0.18.0-rc1, \< 1.18.0; Gleam \>= 8447b78cc844ff4aec44eea23dbd68d1fea11f11, \< c9c0d48c123c8abae6db8dd61b25ccb427ed3d35.

### Is there a fix for CVE-2026-59247?

Yes. Fixed in Gleam 1.18.0. Upgrade Gleam to 1.18.0 or later.

### How do I check if I'm affected by CVE-2026-59247?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-59247>

HTML: <https://flawdb.com/CVE-2026-59247> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-59247>
