{"id":"CVE-2026-32685","aliases":["EEF-CVE-2026-32685","EUVD-2026-33927","GHSA-wjx8-7w8m-p4v7","openSUSE-SU-2026:10953-1","openSUSE-SU-2026:21143-1"],"status":"published","title":"Path Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write","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.\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/\u003cpackage\u003e/ 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 until 1.17.0.","severity":{"version":"4.0","score":4.6,"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","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00229,"percentile":0.13744,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-22"],"published":"2026-06-02T13:41:37Z","modified":"2026-10-28T02:31:00Z","affected":[{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"gleam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.17.0-1.1"}]}],"bundled":3},{"source":"osv","ecosystem":"openSUSE:Leap 16.0","package":"gleam","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.17.0-bp160.1.1"}]}],"bundled":3}],"products":[{"vendor":"gleam","product":"gleam"}],"references":[{"url":"https://github.com/gleam-lang/gleam/security/advisories/GHSA-wjx8-7w8m-p4v7","tags":["vendor-advisory","related","exploit","advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-32685.html","tags":["related","web"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-32685","tags":["related","web"]},{"url":"https://github.com/gleam-lang/gleam/commit/81570611906b6b0039c948037094d09a68700f3a","tags":["patch","fix"]},{"url":"https://github.com/gleam-lang/gleam/commit/c9230cd3045de8fd8481dae3a4557c0146df1430","tags":["patch","fix"]},{"url":"https://ghcr.io","tags":["web"]},{"url":"https://github.com","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32685.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32685","tags":["advisory"]},{"url":"https://github.com/gleam-lang/gleam","tags":["package"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-32685","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-42795","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-43965","tags":["web"]},{"url":"https://bugzilla.suse.com/1267396","tags":["report"]},{"url":"https://bugzilla.suse.com/1267397","tags":["report"]},{"url":"https://bugzilla.suse.com/1267398","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-32685","title":"Path Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write","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.\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/\u003cpackage\u003e/ 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 until 1.17.0.","status":"published","published":"2026-06-02T13:41:37.885Z","modified":"2026-09-08T01:05:06.166Z","cvss":[{"version":"4.0","score":4.6,"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","level":"medium","assessor":"cna"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:19:57.47301Z"}],"euvd":[{"id":"EUVD-2026-33927","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.\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/\u003cpackage\u003e/ 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 until 1.17.0.","status":"published","published":"2026-06-02T13:41:37Z","modified":"2026-09-08T01:05:06Z","cvss":[{"version":"4.0","score":4.6,"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","level":"medium"}],"updated_at":"2026-11-02T17:28:30.317832Z"}],"nvd":[{"id":"CVE-2026-32685","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.\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/\u003cpackage\u003e/ 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 until 1.17.0.","status":"published","published":"2026-06-02T14:16:50.61Z","modified":"2026-10-06T22:10:00.247Z","cvss":[{"version":"4.0","score":4.6,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:12:22.022466Z"}],"osv":[{"id":"CVE-2026-32685","title":"Path Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write","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.\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/\u003cpackage\u003e/ 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 until 1.17.0.","status":"published","published":"2026-06-02T13:41:37.885Z","modified":"2026-10-28T02:31:00.870874807Z","cvss":[{"version":"4.0","score":4.6,"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","level":"medium"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:45:01.548715Z"},{"id":"EEF-CVE-2026-32685","title":"Path Traversal in gleam docs build via documentation.pages Allows Arbitrary File Read and Write","description":"## 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/\u003cpackage\u003e/ 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 until 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.","status":"published","published":"2026-06-02T13:41:37.885Z","modified":"2026-09-08T01:15:02.903073037Z","cvss":[{"version":"4.0","score":4.6,"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","level":"medium"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:33.047032Z"},{"id":"openSUSE-SU-2026:10953-1","title":"gleam-1.17.0-1.1 on GA media","description":"These are all security issues fixed in the gleam-1.17.0-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-06-04T00:00:00Z","modified":"2026-06-05T10:45:56.543677446Z","updated_at":"2026-11-02T16:58:38.95195Z"},{"id":"openSUSE-SU-2026:21143-1","title":"Security update for gleam","description":"This update for gleam fixes the following issues:\n\nChanges in gleam:\n\n- Update to 1.17.0:\n  * Fixed security vulnerabilities:\n    - Restrict custom documentation page `path` and `source` values so\n      `gleam docs build` cannot escape the docs output directory or project\n      root (bsc#1267396, CVE-2026-32685)\n    - Restrict publication tarball creation so they cannot contain files\n      from outside the project root (bsc#1267397, CVE-2026-42795)\n    - Stricter deserialisation rules for files internal the build directory\n      to reject corrupted data (bsc#1267398, CVE-2026-43965)\n  * All features and bug fixes are extensively highlighted with\n    examples in the upstream blog post at\n    https://gleam.run/news/single-file-gleam-beam-programs-with-escript/\n    and changelog at\n    https://github.com/gleam-lang/gleam/blob/v1.17.0/CHANGELOG.md some of\n    the highlights include:\n    - Various JavaScript code generation fixes and optimization\n    - Various compiler error handling improvements\n    - Ability to use the `todo` keyword in constants\n    - Improved handling of Git monorepos during package management\n    - Ability to create escripts from Gleam programs\n    - Various language server improvements like reference highlighting,\n      record hovering and code actions\n\n- Update to 1.16.0:\n  * Changelog v1.16.0: https://gleam.run/news/javascript-source-maps/\n\n- Update to 1.15.1:\n  * Changelog v1.12.0: https://gleam.run/news/no-more-dependency-management-headaches/\n  * Changelog v1.13.0: https://gleam.run/news/formalising-external-apis/\n  * Changelog v1.14.0: https://gleam.run/news/the-happy-holidays-2025-release/\n  * Changelog v1.15.0: https://gleam.run/news/upgrading-hex-security/\n\n- Replace deprecated \"disabled\" mode with \"manual\" in _service\n- Update to 1.11.0:\n  * The displaying of internal types in HTML documentation has been\n\timproved\n  * A warning is now emitted when the same module is imported\n\tmultiple times into the same module with different aliases\n  * Fixed a bug where a bit array segment matching on a floating\n\tpoint number would match with NaN or Infinity on the JavaScript\n\ttarget\n  * https://github.com/gleam-lang/gleam/blob/v1.11.1/CHANGELOG.md\n\n- Update to 1.10.0:\n  * Changelog: https://gleam.run/news/global-rename-and-find-references/\n\n- skip unit tests that requires networking upon build\n\n- Update to 1.9.0:\n  * Changelog: https://gleam.run/news/hello-echo-hello-git/\n\n- Update to 1.8.1:\n * Fixed a metadata caching bug where accessors for opaque types\n   could sometimes be used in other modules. (Louis Pilfold)\n * Changelog: https://gleam.run/news/gleam-gets-rename-variable/\n\n- Update to 1.7.0:\n * Changelog: https://gleam.run/news/improved-performance-and-publishing/\n\n- Update to 1.6.3:\n * Fixed a bug where Gleam would be unable to compile to BEAM\n   bytecode on older versions of Erlang/OTP. (yoshi)\n\n- Update to 1.6.2:\n * Fixed a bug where patterns in use expressions would not be checked\n   to ensure that they were exhaustive. (Surya Rose)\n\n- Update to 1.6.1:\n * fix update use_manifest logic (Jason Sipula)\n * 1.6.0 Changelog: https://gleam.run/news/context-aware-compilation/\n","status":"published","published":"2026-06-23T09:40:09Z","modified":"2026-06-30T18:24:44.864495883Z","updated_at":"2026-11-02T16:58:41.885092Z"}]}}
