{"id":"CVE-2026-32685","aliases":["CVE-2026-32685","EEF-CVE-2026-32685","GHSA-wjx8-7w8m-p4v7"],"related":[],"kind":"vulnerability","state":"published","title":"Path Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write","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.\n\nThe 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.\n\nAn 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.\n\nThis issue affects gleam: from 1.16.0 before 1.17.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Path traversal vulnerability in Gleam's handling of custom documentation pages allows arbitrary file read and file write outside the intended documentation output directory.\n\nThe 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.\n\nAn 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.\n\nThis issue affects gleam: from 1.16.0 before 1.17.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nPath traversal vulnerability in Gleam's handling of custom documentation pages allows arbitrary file read and file write outside the intended documentation output directory.\n\nThe `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.\n\nAn 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.\n\nThis issue affects gleam: from 1.16.0 before 1.17.0.\n\n## Workarounds\n\n* Avoid running `gleam docs build` on untrusted projects\n* Review `documentation.pages` entries in `gleam.toml` before generating documentation\n* Run documentation generation in a restricted or isolated environment (e.g. containers)\n\n## Configurations\n\nThe 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.","format":"markdown","source":"eef"},{"lang":"es","text":"Una vulnerabilidad de salto de ruta en el manejo de Gleam de las páginas de documentación personalizadas permite la lectura y escritura arbitraria de archivos fuera del directorio de salida de documentación previsto.\n\nLas entradas documentation.pages de gleam.toml se incorporan en rutas del sistema de archivos sin suficiente validación o confinamiento a los directorios de salida de proyecto y documentación previstos. El campo documentation.pages[].path puede usarse para escribir archivos de documentación generados fuera del directorio de salida previsto build/dev/docs/<package>/. El campo documentation.pages[].source puede usarse para leer archivos fuera del directorio del proyecto e incrustar su contenido en la salida de documentación generada.\n\nUn atacante que pueda convencer a una víctima de ejecutar gleam docs build en un proyecto no confiable, o con contenido gleam.toml no confiable, puede hacer que archivos locales legibles por la víctima se incluyan en artefactos de documentación generados, y puede hacer que los archivos de documentación generados se escriban fuera del directorio de salida de docs previsto.\n\nEste problema afecta a Gleam desde la versión 1.16.0 hasta la 1.17.0.","source":"nvd"}],"published":"2026-06-02T13:41:37.885Z","modified":"2026-11-25T06:30:22.757Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":4.6,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":4.6,"rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"type":"other","introduced":"v1.16.0-elixir","fixed":"v1.17.0-elixir","status":"affected"},{"type":"other","introduced":"v1.16.0-erlang","fixed":"v1.17.0-erlang","status":"affected"},{"type":"other","introduced":"v1.16.0-node","fixed":"v1.17.0-node","status":"affected"},{"type":"other","introduced":"v1.16.0-node-slim","fixed":"v1.17.0-node-slim","status":"affected"},{"type":"other","introduced":"v1.16.0-elixir-slim","fixed":"v1.17.0-elixir-slim","status":"affected"},{"type":"other","introduced":"v1.16.0-erlang-slim","fixed":"v1.17.0-erlang-slim","status":"affected"},{"type":"other","introduced":"v1.16.0-erlang-alpine","fixed":"v1.17.0-erlang-alpine","status":"affected"},{"type":"other","introduced":"v1.16.0-elixir-alpine","fixed":"v1.17.0-elixir-alpine","status":"affected"},{"type":"other","introduced":"v1.16.0-node-alpine","fixed":"v1.17.0-node-alpine","status":"affected"},{"type":"other","introduced":"v1.16.0-scratch","fixed":"v1.17.0-scratch","status":"affected"}],"vendor":"Gleam","product":"Gleam","package":"gleam-lang/gleam","cpe":"cpe:2.3:a:gleam-lang:gleam:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.16.0","fixed":"1.17.0","status":"affected"}],"vendor":"Gleam","product":"Gleam","package":"gleam","cpe":"cpe:2.3:a:gleam-lang:gleam:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"git","introduced":"61ed8deb6572b5591ad17d6302c1a38607522f16","fixed":"81570611906b6b0039c948037094d09a68700f3a","status":"affected"}],"vendor":"Gleam","product":"Gleam","package":"gleam-lang/gleam","cpe":"cpe:2.3:a:gleam-lang:gleam:*:*:*:*:*:*:*:*","repo":"https://github.com/gleam-lang/gleam","source":"cvelist"},{"ranges":[{"type":"git","introduced":"61ed8deb6572b5591ad17d6302c1a38607522f16","status":"affected","fixed":"81570611906b6b0039c948037094d09a68700f3a"}],"repo":"https://github.com/gleam-lang/gleam","source":"eef"}],"references":[{"url":"https://github.com/gleam-lang/gleam/security/advisories/GHSA-wjx8-7w8m-p4v7","tags":["advisory","exploit","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-32685.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-32685","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/gleam-lang/gleam/commit/c9230cd3045de8fd8481dae3a4557c0146df1430","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/gleam-lang/gleam/commit/61ed8deb6572b5591ad17d6302c1a38607522f16","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/gleam-lang/gleam/commit/81570611906b6b0039c948037094d09a68700f3a","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]}],"credits":["evipepota","Jonatan Männchen / EEF","Louis Pilfold"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-02T15:06:11.916Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-32685","url":"https://www.cve.org/CVERecord?id=CVE-2026-32685","licence":"CVE Terms of Use","modified":"2026-11-20T05:59:07.627Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-32685","url":"https://osv.dev/vulnerability/EEF-CVE-2026-32685","licence":"CC-BY-4.0","modified":"2026-11-25T06:30:22.757Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-32685","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32685","licence":"Public domain","modified":"2026-11-20T06:17:25.087Z"}],"updatedAt":"2026-11-25T22:59:23.561Z","epss":{"score":0.0028,"percentile":0.22066,"date":"2026-12-01T12:00:22.000Z"}}