Skip to main content
← All vulnerabilities
CVE-2026-32685

Path Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.17.0, v1.17.0-elixir, v1.17.0-erlang, v1.17.0-node, v1.17.0-node-slim, and 6 more
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • gleam

    From 1.16.0 · fixed in 1.17.0

  • gleam-lang/gleam

    From 1.16.0 · fixed in 1.17.0

  • gleam-lang/gleam

    From v1.16.0-elixir · fixed in v1.17.0-elixir; From v1.16.0-erlang · fixed in v1.17.0-erlang; From v1.16.0-node · fixed in v1.17.0-node; From v1.16.0-node-slim · fixed in v1.17.0-node-slim; From v1.16.0-elixir-slim · fixed in v1.17.0-elixir-slim; From v1.16.0-erlang-slim · fixed in v1.17.0-erlang-slim; From v1.16.0-erlang-alpine · fixed in v1.17.0-erlang-alpine; From v1.16.0-elixir-alpine · fixed in v1.17.0-elixir-alpine; From v1.16.0-node-alpine · fixed in v1.17.0-node-alpine; From v1.16.0-scratch · fixed in v1.17.0-scratch

References 5

GitHub · gleam-lang/gleam

cna.erlef.org

osv.dev