CVE-2026-32685
Medium 4.6No known exploitationFix availablePath Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write
Record last updated
CVSS score
Medium on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
Higher than 14% of scored CVEs. A prediction, not evidence.
CISA remediation deadline
Not in the KEV catalog
Description
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/ / 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 before 1.17.0.
Weakness: CWE-22
Patching and mitigation
- Patch status
- Fix available (source: CVE record (EEF))
- Fix documented (source date)
- Mitigation
- * Avoid running gleam docs build on untrusted projects * Review documentation.pages entries in gleam.toml before generating documentation * Run documentation generation in a restricted or isolated environment (e.g. containers) Source (opens in a new tab)
- Vendor guidance
- github.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| Gleam | Gleam | from 1.16.0 before 1.17.0 | 1.17.0 | CVE Program |
| Gleam | Gleam | from 61ed8deb6572b5591ad17d6302c1a38607522f16 before 81570611906b6b0039c948037094d09a68700f3a | 81570611906b6b0039c948037094d09a68700f3a | CVE Program |
| Gleam | Gleam | from v1.16.0-elixir before v1.17.0-elixir | v1.17.0-elixir | CVE Program |
| Gleam | Gleam | from v1.16.0-elixir-alpine before v1.17.0-elixir-alpine | v1.17.0-elixir-alpine | CVE Program |
| Gleam | Gleam | from v1.16.0-elixir-slim before v1.17.0-elixir-slim | v1.17.0-elixir-slim | CVE Program |
| Gleam | Gleam | from v1.16.0-erlang before v1.17.0-erlang | v1.17.0-erlang | CVE Program |
| Gleam | Gleam | from v1.16.0-erlang-alpine before v1.17.0-erlang-alpine | v1.17.0-erlang-alpine | CVE Program |
| Gleam | Gleam | from v1.16.0-erlang-slim before v1.17.0-erlang-slim | v1.17.0-erlang-slim | CVE Program |
| Gleam | Gleam | from v1.16.0-node before v1.17.0-node | v1.17.0-node | CVE Program |
| Gleam | Gleam | from v1.16.0-node-alpine before v1.17.0-node-alpine | v1.17.0-node-alpine | CVE Program |
| Gleam | Gleam | from v1.16.0-node-slim before v1.17.0-node-slim | v1.17.0-node-slim | CVE Program |
| Gleam | Gleam | from v1.16.0-scratch before v1.17.0-scratch | v1.17.0-scratch | CVE Program |
Timeline
Disclosure
CVE record published by EEF
Source: CVE Program (opens in a new tab)
Patch
Fix documented by CVE record (EEF)
Vendor guidance and references
- Fix commit 8157061 in gleam-lang/gleam (opens in a new tab)patch
- Restrict documentation page path handling (opens in a new tab)patch
- Path traversal and arbitrary file read in `gleam docs build` via `documentation.pages` (opens in a new tab)related, vendor-advisory
- EEF CNA record for CVE-2026-32685 (opens in a new tab)related
- Introducing commit 61ed8de in gleam-lang/gleam (opens in a new tab)related
- OSV record EEF-CVE-2026-32685 (opens in a new tab)related