CVE-2026-32685

Source
https://cve.org/CVERecord?id=CVE-2026-32685
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-32685.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-32685
Aliases
Downstream
Related
Published
2026-06-02T13:41:37.885Z
Modified
2026-08-07T11:50:16.209915439Z
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

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.

Database specific
{
    "unresolved_ranges": [
        {
            "source": "AFFECTED_FIELD",
            "extracted_events": [
                {
                    "introduced": "61ed8deb6572b5591ad17d6302c1a38607522f16"
                },
                {
                    "fixed": "81570611906b6b0039c948037094d09a68700f3a"
                }
            ]
        }
    ],
    "cna_assigner": "EEF",
    "cwe_ids": [
        "CWE-22"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32685.json"
}
References

Affected packages

Git / github.com/gleam-lang/gleam

Affected ranges

Type
GIT
Repo
https://github.com/gleam-lang/gleam
Events
Database specific
{
    "extracted_events": [
        {
            "introduced": "1.16.0"
        },
        {
            "fixed": "1.17.0"
        },
        {
            "introduced": "v1.16.0-elixir"
        },
        {
            "fixed": "v1.17.0-elixir"
        },
        {
            "introduced": "v1.16.0-erlang"
        },
        {
            "fixed": "v1.17.0-erlang"
        },
        {
            "introduced": "v1.16.0-node"
        },
        {
            "fixed": "v1.17.0-node"
        },
        {
            "introduced": "v1.16.0-node-slim"
        },
        {
            "fixed": "v1.17.0-node-slim"
        },
        {
            "introduced": "v1.16.0-elixir-slim"
        },
        {
            "fixed": "v1.17.0-elixir-slim"
        },
        {
            "introduced": "v1.16.0-erlang-slim"
        },
        {
            "fixed": "v1.17.0-erlang-slim"
        },
        {
            "introduced": "v1.16.0-erlang-alpine"
        },
        {
            "fixed": "v1.17.0-erlang-alpine"
        },
        {
            "introduced": "v1.16.0-elixir-alpine"
        },
        {
            "fixed": "v1.17.0-elixir-alpine"
        },
        {
            "introduced": "v1.16.0-node-alpine"
        },
        {
            "fixed": "v1.17.0-node-alpine"
        },
        {
            "introduced": "v1.16.0-scratch"
        },
        {
            "fixed": "v1.17.0-scratch"
        }
    ],
    "source": [
        "AFFECTED_FIELD",
        "REFERENCES"
    ]
}

Affected versions

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

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-32685.json"