CVE-2026-59247
JSON

7.6high

Insufficient verification of Hex package metadata in Gleam

Severity
7.6high CVSS:4.0 by EEF
Exploit likelihood
0.16% (higher than 5% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
EEF
Also known as
EEF-CVE-2026-59247GHSA-4vvc-458m-r82g

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

Product or packageVersionsReported by
gleam-lang/gleamfrom 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 and 3 moreCVE List
gleamfrom 0.18.0-rc1 before 1.18.0CVE List
https://github.com/gleam-lang/gleamfrom 8447b78cc844ff4aec44eea23dbd68d1fea11f11 before c9c0d48c123c8abae6db8dd61b25ccb427ed3d35Erlang Ecosystem Foundation

All scores

EEF7.6high CVSS:4.0CVSS: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 FoundationNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Classification

CWE-345

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

Erlang Ecosystem Foundation

Summary

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.

NVD (es)

Vulnerabilidad de verificación insuficiente de la autenticidad de los datos en Gleam permite a un adversario en el medio sustituir contenidos falsificados de paquetes Hex durante la resolución de dependencias. Durante la resolución de dependencias, Gleam obtiene metadatos del paquete del repositorio Hex verificado por firma, que cubre los requisitos de dependencia de cada lanzamiento y el outer_checksum SHA-256. Después de resolver las versiones, gleam_cli::dependencies::lookup_package realiza una segunda solicitud a la API Hex sin firmar a través de gleam_core::hex::get_package_release y registra el outer_checksum y los nombres de las dependencias de esa respuesta JSON en manifest.toml, en lugar de los valores de los metadatos del repositorio verificado. La firma del repositorio Hex no cubre la respuesta de la API. Un adversario en el medio que puede interceptar TLS con un certificado de confianza para el proceso Gleam (por ejemplo, un proxy de inspección de TLS que utiliza una CA en el almacén de confianza del sistema operativo o añadido a través de GLEAM_CACERTS_PATH), y que puede modificar tanto la respuesta de lanzamiento de la API como el tarball del repositorio correspondiente, puede suministrar un archivo de paquete con un checksum falsificado coincidente sin la clave de firma del repositorio Hex. Gleam verifica el tarball falsificado contra el checksum falsificado, lo acepta y lo extrae como fuente de dependencia, lo que resulta en la pérdida de integridad de los contenidos del paquete descargado. Solo los proyectos que resuelven o actualizan dependencias Hex se ven afectados, lo que ocurre cuando falta el manifiesto, se añade o actualiza una dependencia, o cambian los requisitos de dependencia. Las compilaciones que reutilizan un manifest.toml inalterado y conocido como bueno continúan verificando los tarballs contra su checksum fijado. Este problema afecta a gleam: desde 0.18.0 antes de 1.18.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-59247 changed 2026-11-20CVE Terms of Use
Erlang Ecosystem FoundationEEF-CVE-2026-59247 changed 2026-11-25CC-BY-4.0
NVDCVE-2026-59247 changed 2026-11-20Public domain