Gleam · Gleam · CVE-2026-32685
**Name of the Vulnerable Software and Affected Versions**
Gleam versions 1.16.0 through 1.17.0
**Description**
A path traversal issue exists in the handling of custom documentation pages. The `documentation.pages` entries within the `gleam.toml` file are incorporated into filesystem paths without sufficient validation. Specifically, the `documentation.pages[].path` field allows writing generated documentation files outside the intended `build/dev/docs/<package>/` directory, and the `documentation.pages[].source` field allows reading files from outside the project directory to embed them into the output. An attacker can exploit this by convincing a victim to run `gleam docs build` on an untrusted project or with malicious `gleam.toml` content, leading to arbitrary file read and write operations.
**Recommendations**
Update to a version later than 1.17.0.
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, such as containers.