Path Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- 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
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 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
- CVE published
- CISA SSVC assessment
Exploitation: poc · Automatable: no · Technical impact: partial
- 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