Skip to main content

Gleam CLI CVE-2026-32685

| EUVDEUVD-2026-33927 MEDIUM
Path Traversal (CWE-22)
2026-06-02 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
4.6
CVSS 4.0 · Vendor: 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Craft malicious gleam.toml with traversal paths
  2. Delivery
    Distribute via open-source repo or package
  3. Exploit
    Victim clones project and runs gleam docs build
  4. Install
    CLI reads source file outside project root
  5. C2
    Sensitive file contents embedded in generated HTML
  6. Execute
    Victim publishes or shares docs artifact
  7. Impact
    Attacker 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Gleam v1.16.0-node-alpine <v1.17.0-node-alpine
Gleam v1.16.0-node <v1.17.0-node
Gleam v1.16.0-erlang-alpine <v1.17.0-erlang-alpine
Gleam v1.16.0-elixir <v1.17.0-elixir
Gleam 1.16.0 <1.17.0
Gleam v1.16.0-elixir-slim <v1.17.0-elixir-slim
Gleam v1.16.0-elixir-alpine <v1.17.0-elixir-alpine
Gleam v1.16.0-erlang-slim <v1.17.0-erlang-slim
Gleam v1.16.0-node-slim <v1.17.0-node-slim
Gleam v1.16.0-erlang <v1.17.0-erlang
Gleam 61ed8deb6572b5591ad17d6302c1a38607522f16 <81570611906b6b0039c948037094d09a68700f3a
Gleam v1.16.0-scratch <v1.17.0-scratch

Affected Packages

euvd gleam fix: 1.17.0

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

Vendor (6b3ad84c-e1a6-4bf7-a703-f496b71e49db) PRIMARY 4.6 MEDIUM
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
SUSE MEDIUM

Primary rating from Vendor (6b3ad84c-e1a6-4bf7-a703-f496b71e49db).

CVSS VectorVendor: 6b3ad84c-e1a6-4bf7-a703-f496b71e49db

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jun 02, 2026 - 16:01 EUVD

DescriptionCVE.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

EPSS Score
0.0%
Top 97% exploitable
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

23
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +23
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

SUSE

Severity: Medium

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy