CVE-2026-59247
Insufficient verification of Hex package metadata in Gleam
Check your servers for CVE-2026-59247
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-59247 affects gleam, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
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
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Attack requirements
- present: an attack works only when the target is in a certain state or configuration
- Privileges required
- none: the attacker does not need an account
- User interaction
- passive: a user has to take part without knowing, such as by viewing a page
- Impact on the vulnerable system
- confidentiality high, integrity high, availability none: what an attacker can read, change or stop in the vulnerable component
- Impact on other systems
- confidentiality none, integrity none, availability none: what an attacker can read, change or stop beyond it
Exploitation
EPSS 0.16%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 5.72% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 29 Jul 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-345 Insufficient Verification of Data Authenticity
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
Gleam
package
gleam-lang/gleam |
affected from v0.18.0-rc1-elixir, before v1.18.0-elixir affected from v0.18.0-rc1-erlang, before v1.18.0-erlang affected from v0.18.0-rc1-node, before v1.18.0-node affected from v0.18.0-rc1-node-slim, before v1.18.0-node-slim affected from v0.18.0-rc1-elixir-slim, before v1.18.0-elixir-slim affected from v0.18.0-rc1-erlang-slim, before v1.18.0-erlang-slim affected from v0.18.0-rc1-erlang-alpine, before v1.18.0-erlang-alpine affected from v0.18.0-rc1-elixir-alpine, before v1.18.0-elixir-alpine affected from v0.18.0-rc1-node-alpine, before v1.18.0-node-alpine affected from v0.18.0-rc1-scratch, before v1.18.0-scratch
Other versions: unaffected
|
|
Gleam
package
gleam |
affected from 0.18.0-rc1, before 1.18.0
Other versions: unaffected
|
|
Gleam
package
gleam-lang/gleam |
affected from 8447b78cc844ff4aec44eea23dbd68d1fea11f11, before c9c0d48c123c8abae6db8dd61b25ccb427ed3d35
Other versions: unaffected
|
Is my server affected?
Find the installed version of gleam and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i gleam
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-59247 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-59247RHEL, Rocky, Alma, Fedora
rpm -q gleam
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-59247Alpine
apk list --installed | grep -i gleamWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-59247
trivy image --scanners vuln IMAGE | grep CVE-2026-59247
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- Insufficient Verification of Hex Package Metadata in Gleam github.com · vendor advisory, related
Patches and release notes
- Fix commit c9c0d48 in gleam-lang/gleam github.com · patch
Other references
- EEF CNA record for CVE-2026-59247 cna.erlef.org · related
- OSV record EEF-CVE-2026-59247 osv.dev · related
- https://github.com/hexpm/specifications/blob/main/registry-v2.md github.com · related
- Introducing commit 8447b78 in gleam-lang/gleam github.com · related
Source: the record CVE-2026-59247 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse