EEF-CVE-2026-32685

Source
https://cna.erlef.org/osv/EEF-CVE-2026-32685.html
Import Source
https://cna.erlef.org/osv/EEF-CVE-2026-32685.json
JSON Data
https://api.osv.dev/v1/vulns/EEF-CVE-2026-32685
Aliases
  • CVE-2026-32685
  • GHSA-wjx8-7w8m-p4v7
Published
2026-06-02T13:41:37.885Z
Modified
2026-06-02T19:14:20.700Z
Severity
  • 4.6 (Medium) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
Path Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write
Details

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.

Workaround

  • 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)

Configuration

The project must use custom documentation pages via documentation.pages in gleam.toml, and the victim must run gleam docs build on an untrusted project or with untrusted gleam.toml content. Projects that do not use custom documentation pages are not affected.

Database specific
{
    "cwe_ids": [
        "CWE-22"
    ],
    "cpe_ids": [
        "cpe:2.3:a:gleam-lang:gleam:*:*:*:*:*:*:*:*"
    ],
    "capec_ids": [
        "CAPEC-139",
        "CAPEC-597"
    ]
}
References
Credits
    • evipepota - FINDER
    • evipepota - REMEDIATION_DEVELOPER
    • Louis Pilfold - REMEDIATION_REVIEWER
    • Jonatan Männchen / EEF - ANALYST

Affected packages

Git / github.com/gleam-lang/gleam

Affected ranges

Type
GIT
Repo
https://github.com/gleam-lang/gleam
Events

Affected versions

v1.*
v1.16.0
v1.17.0-rc1
v1.17.0-rc2

Database specific

source
"https://cna.erlef.org/osv/EEF-CVE-2026-32685.json"