Insufficient verification of Hex package metadata in Gleam

Summary

CVECVE-2026-59247
StatePUBLISHED
AssignerEEF
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-07-29 15:16:26 UTC
Updated2026-07-30 19:14:09 UTC
DescriptionInsufficient 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.

Risk And Classification

Primary CVSS: v4.0 7.6 HIGH from 6b3ad84c-e1a6-4bf7-a703-f496b71e49db

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

EPSS: 0.001300000 probability, percentile 0.030060000 (date 2026-08-01)

Problem Types: CWE-345 | CWE-345 CWE-345 Insufficient Verification of Data Authenticity


VersionSourceTypeScoreSeverityVector
4.06b3ad84c-e1a6-4bf7-a703-f496b71e49dbSecondary7.6HIGHCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/C...
4.0CNACVSS7.6HIGHCVSS: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 v4.0 Breakdown

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Confidentiality
High
Integrity
High
Availability
None
Sub Conf.
None
Sub Integrity
None
Sub Availability
None

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Gleam-lang Gleam affected 0.18.0 1.18.0 semver Not specified
CNA Gleam-lang Gleam affected 0.18.0 1.18.0 semver Not specified
CNA Gleam-lang Gleam affected 8447b78cc844ff4aec44eea23dbd68d1fea11f11 c9c0d48c123c8abae6db8dd61b25ccb427ed3d35 git Not specified
CNA Gleam-lang Gleam affected v0.18.0-elixir v1.18.0-elixir other Not specified
CNA Gleam-lang Gleam affected v0.18.0-elixir-slim v1.18.0-elixir-slim other Not specified
CNA Gleam-lang Gleam affected v0.18.0-elixir-alpine v1.18.0-elixir-alpine other Not specified
CNA Gleam-lang Gleam affected v0.18.0-erlang v1.18.0-erlang other Not specified
CNA Gleam-lang Gleam affected v0.18.0-erlang-slim v1.18.0-erlang-slim other Not specified
CNA Gleam-lang Gleam affected v0.18.0-erlang-alpine v1.18.0-erlang-alpine other Not specified
CNA Gleam-lang Gleam affected v0.18.0-node v1.18.0-node other Not specified
CNA Gleam-lang Gleam affected v0.18.0-node-slim v1.18.0-node-slim other Not specified
CNA Gleam-lang Gleam affected v0.18.0-node-alpine v1.18.0-node-alpine other Not specified
CNA Gleam-lang Gleam affected v1.6.0-scratch v1.18.0-scratch other Not specified

References

ReferenceSourceLinkTags
github.com/hexpm/specifications/blob/main/registry-v2.md 6b3ad84c-e1a6-4bf7-a703-f496b71e49db github.com
github.com/gleam-lang/gleam/security/advisories/GHSA-4vvc-458m-r82g 6b3ad84c-e1a6-4bf7-a703-f496b71e49db github.com
cna.erlef.org/cves/CVE-2026-59247.html 6b3ad84c-e1a6-4bf7-a703-f496b71e49db cna.erlef.org
github.com/gleam-lang/gleam/commit/c9c0d48c123c8abae6db8dd61b25ccb427ed3d35 6b3ad84c-e1a6-4bf7-a703-f496b71e49db github.com
osv.dev/vulnerability/EEF-CVE-2026-59247 6b3ad84c-e1a6-4bf7-a703-f496b71e49db osv.dev
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: John Downey (en)

CNA: John Downey (en)

CNA: Louis Pilfold (en)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report