Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft malicious gleam.toml with traversal paths
-
DeliveryDistribute via open-source repo or package
-
ExploitVictim clones project and runs gleam docs build
-
InstallCLI reads source file outside project root
-
C2Sensitive file contents embedded in generated HTML
-
ExecuteVictim publishes or shares docs artifact
-
ImpactAttacker retrieves exfiltrated data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to actively run gleam docs build (or an equivalent documentation generation command) against a project directory containing a malicious or attacker-influenced gleam.toml file. The documentation.pages[].source field must reference a path that traverses above the project root (e.g., using ../), and documentation.pages[].path must traverse above the build/dev/docs/<package>/ output directory. No network access to the victim's machine is required; the attacker's influence is limited to control over gleam.toml content, achievable via a malicious open-source package, a compromised dependency, or a social engineering scenario. Exploitation is limited to: Gleam 1.16.x only; files readable by the user executing the command (VC:L); write targets limited by OS filesystem permissions; and requires the user to willingly run gleam docs build (UI:A). The attack does NOT apply to gleam build or gleam run - only the documentation subcommand is affected. |
| Impact | CVSS 4.0 rates this 4.6 (Medium). The vector AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N indicates local attack vector with required user interaction - the victim must actively execute gleam docs build on attacker-controlled content. This is a supply-chain-adjacent developer tooling attack, not a server-side or network-reachable vulnerability. Real-world risk is moderate for developers who clone and document third-party Gleam projects without inspecting gleam.toml. EPSS data is not provided; given the niche language ecosystem and required user action, opportunistic mass exploitation is unlikely. KEV status is negative and no POC is known, consistent with a recently disclosed, targeted developer-tooling issue. The confidentiality and integrity impacts are both rated Low in CVSS - file contents leak into docs artifacts rather than directly to an attacker, and write-outside-directory impact depends on path traversal depth and target system permissions. The primary real-world concern is credential or secret theft embedded in generated documentation that is then shared or published. |
| Exploit ScenarioDerived | An attacker publishes a malicious Gleam package or repository with a crafted gleam.toml containing a documentation.pages entry where source is set to ../../.ssh/id_rsa or a similar sensitive path. When a developer clones the repository and runs gleam docs build (a common workflow step), the tool reads the private key and embeds it in the generated HTML documentation artifact. If the developer then publishes that documentation - for example, to GitHub Pages - the sensitive file contents are exposed publicly. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 02, 2026
Path traversal in Gleam's documentation build tooling allows arbitrary file read and write on a developer's workstation when gleam docs build is run against a malicious project. The documentation.pages[].source and documentation.pages[].path fields in gleam.toml accept unsanitized filesystem paths, enabling an attacker who controls gleam.toml content to exfiltrate local files (embedded into generated docs artifacts) or write generated files to arbitrary locations outside build/dev/docs/. Affected versions span only Gleam 1.16.x; no public exploit identified at time of analysis and no KEV listing, but the attack surface is any developer who clones and builds documentation for an untrusted Gleam project.
RemediationAI
Upgrade to Gleam 1.17.0, which contains the fixes in commits 81570611906b6b0039c948037094d09a68700f3a and c9230cd3045de8fd8481dae3a4557c0146df1430 that correct path confinement in compiler-cli/src/docs.rs. Advisory details at https://github.com/gleam-lang/gleam/security/advisories/GHSA-wjx8-7w8m-p4v7. As a compensating control for teams that cannot immediately upgrade, avoid running gleam docs build on projects with untrusted or unreviewed gleam.toml files; manually inspect the documentation.pages[].path and documentation.pages[].source fields for directory traversal sequences (../) before executing the docs build command. This inspection can be incorporated into code review gates or CI pre-checks for third-party Gleam dependencies. There is no known server-side exposure - the attack requires local execution, so blocking at the developer workstation policy level is an effective interim control.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Gleam is a statically-typed functional language that compiles to Erlang and JavaScript. Its CLI tool includes a gleam docs build command that reads documentation page configuration from gleam.toml. The vulnerable code (compiler-cli/src/docs.rs) incorporated documentation.pages[].path and documentation.pages[].source fields directly into filesystem path operations via the normalize_path_within_base function, which was intended to confine paths to the project root and build/dev/docs/<package>/ output directory respectively. CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) applies: the normalization function using Utf8Component iteration failed to sufficiently prevent escape via relative path sequences, allowing a crafted gleam.toml with values like ../../escape.html or a source pointing above the project root to traverse directory boundaries. The two fix commits (81570611 and c9230cd3) rework this path handling in compiler-cli/src/docs.rs.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Primary rating from Vendor (6b3ad84c-e1a6-4bf7-a703-f496b71e49db).
CVSS VectorVendor: 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Lifecycle Timeline
1DescriptionCVE.org
Path traversal vulnerability in Gleam's handling of custom documentation pages allows arbitrary file read and file write outside the intended documentation output directory.
The documentation.pages entries from gleam.toml are incorporated into filesystem paths without sufficient validation or confinement to the intended project and documentation output directories. The documentation.pages[].path field can be used to write generated documentation files outside the intended build/dev/docs/<package>/ output directory. The documentation.pages[].source field can be used to read files outside the project directory and embed their contents into generated documentation output.
An attacker who can convince a victim to run gleam docs build on an untrusted project, or with untrusted gleam.toml content, can cause local files readable by the victim to be included in generated documentation artifacts, and can cause generated documentation files to be written outside the intended docs output directory.
This issue affects Gleam from 1.16.0 until 1.17.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
EUVD-2026-33927
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB