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 before 1.18.0.
Published: 2026-07-29
Score: 7.6 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Gleam performs dependency resolution by first pulling signed metadata from the Hex repository and then querying an unsigned Hex API for release information. The unsigned API response is used to populate the manifest file, including the checksum that verifies the package archive. Because the API response is not signed, an attacker who can intercept TLS—such as through a proxy bearing a trusted CA certificate—can alter both the API JSON and the corresponding tarball, presenting a forged checksum that matches the malicious archive. Gleam then verifies the tarball against this forged checksum, accepts it, and extracts the malicious content, thereby compromising the integrity of the downloaded package. This weakness is a classic example of a Three‑Party Problem (CWE‑345).

Affected Systems

The vulnerability affects the Gleam programming language distribution. Any installation of Gleam between version 0.18.0 and before 1.18.0 is susceptible. The impact applies to builds that trigger dependency resolution or updates, such as during a fresh project creation, adding or updating a hex dependency, or when dependency requirements change. Builds that reuse a previously pinned manifest.toml are not affected because the checksum check falls back to the stored value.

Risk and Exploitability

The CVSS score of 7.6 classifies the issue as a high‑severity integrity problem, but the EPSS score is below 1%, indicating a low likelihood of exploitation at time of analysis. The vulnerability requires a man‑in‑the‑middle capable of presenting a trusted TLS certificate to the Gleam process (for example, a corporate proxy with a certificate in the system trust store or set via GLEAM_CACERTS_PATH). Because the vulnerability is not listed in the CISA KEV catalog, no widespread active exploitation has been reported yet. The risk remains significant for environments that rely on third‑party proxies or that do not strictly control accepted TLS certificates, and mitigation should focus on removing the opportunity for MITM interception or updating to the fixed version.

Generated by OpenCVE AI on August 3, 2026 at 13:19 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to Gleam 1.18.0 or later to obtain the fixed metadata handling logic.
  • Remove or restrict custom CA certificates from the environment, especially any that can be trusted by the Gleam process (e.g., clear GLEAM_CACERTS_PATH or ensure it contains only trusted roots).
  • After upgrading or changing certificate configuration, re‑resolve dependencies so that manifest.toml reflects verified checksums; consider clearing cached packages or deleting stale manifests to force a fresh resolution.

Generated by OpenCVE AI on August 3, 2026 at 13:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 29 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 29 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
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 before 1.18.0.
Title Insufficient verification of Hex package metadata in Gleam
First Time appeared Gleam-lang
Gleam-lang gleam
Weaknesses CWE-345
CPEs cpe:2.3:a:gleam-lang:gleam:*:*:*:*:*:*:*:*
Vendors & Products Gleam-lang
Gleam-lang gleam
References
Metrics cvssV4_0

{'score': 7.6, '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'}


Subscriptions

Gleam-lang Gleam
cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-07-30T04:15:30.182Z

Reserved: 2026-07-04T04:24:03.652Z

Link: CVE-2026-59247

cve-icon Vulnrichment

Updated: 2026-07-29T15:09:30.653Z

cve-icon NVD

Status : Deferred

Published: 2026-07-29T15:16:26.780

Modified: 2026-07-30T19:14:09.213

Link: CVE-2026-59247

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T13:30:04Z

Weaknesses
  • CWE-345

    Insufficient Verification of Data Authenticity