SecurityContext

CVE-2026-59247: Gleam - Insufficient Verification of Data Authenticity

  • Cve: CVE-2026-59247
  • Name: Gleam - Insufficient Verification of Data Authenticity
  • 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.
  • Impact: Man-in-the-middle attackers can supply forged package contents, compromising dependency integrity and potentially executing malicious code.
  • Remediation: Update to Gleam version 1.18.0 or later.
  • Vulnerability type: insufficient_verification_of_data_authenticity
  • Vulnerability impact: remote_code_execution, data_tampering
  • Requirements: Attacker must intercept TLS with a trusted certificate to modify API responses and package tarballs.
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.6
  • Cvss vector: 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 score: 0.00196
  • Epss percentile: 0.09213
  • Assignee: 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
  • Published at: 2026-07-29T15:16:26Z
  • Age in days: 118
  • Modified at: 2026-11-20T06:17:33Z
  • Patch available: yes
  • References total: 6
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-59247
  • Nvd status: deferred
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirement type, hackerone

Cwe

IdName
CWE-345Insufficient Verification of Data Authenticity

References

Same in every row:

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

Products

ProductAffectedPlatform boundSourcesUrl
gleam-lang:gleam>= 0.18.0-rc1, < 1.18.0nocna/v1/products/gleam-lang/gleam

Projects

RepositoryLink kindsIndexedUrl
gleam-lang/gleamcommit, fix, security_advisoryyes/v1/repositories/gleam-lang/gleam

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts