Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
7.1
CVE-2026-32685: Gleam docs build can read or write any file
CVE-2026-32685 · published 5 months ago
Summary
The Gleam programming language's documentation tool can be tricked into accessing files outside the intended documentation folder. An attacker who supplies a malicious project configuration could cause the tool to read private files or write files to arbitrary locations on the system. Update Gleam to a version newer than 1.17.0 or avoid running the documentation command on untrusted projects.
What to do
The CVE record does not list a fixed version. Check the vendor's site or the advisory links below - a fix may already be released.
Affected software
| Vendor | Product | Affected versions |
|---|---|---|
| gleam | gleam |
< 1.17.0 < v1.17.0-elixir |
Original advisory text
Path Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write
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.
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.
References
- https://github.com URL
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32685... Vendor Advisory
- https://github.com/gleam-lang/gleam/security/advisories/GHSA-wjx8-7w8m-p4v7 Vendor Advisory
- https://cna.erlef.org/cves/CVE-2026-32685.html URL
- https://osv.dev/vulnerability/EEF-CVE-2026-32685 URL
- https://ghcr.io URL
- https://nvd.nist.gov/vuln/detail/CVE-2026-32685 Vendor Advisory
- https://github.com/gleam-lang/gleam Product
- https://github.com/gleam-lang/gleam/commit/81570611906b6b0039c948037094d09a68700... Patch
- https://github.com/gleam-lang/gleam/commit/c9230cd3045de8fd8481dae3a4557c0146df1... Patch
Internet-facing
60 days
Internal
At next upgrade
- Not known to be exploited
- Needs hands-on effort to exploit
- Gives an attacker partial control
Severity
7.1
High
Type
CWE-22Path Traversal
Timeline
Published2 Jun 2026
Updated4 Nov 2026
First seen2 Jun 2026
Sources
CVE-2026-32685 · NVD
EEF-CVE-2026-32685 · OSV
GHSA-wjx8-7w8m-p4v7 · GHSA
CVE-2026-32685 · MITRE
CVE-2026-32685 · OSV
Track software like this
Free during beta