{"id":"UBUNTU-CVE-2023-38745","details":"Pandoc before 3.1.6 allows arbitrary file write: this can be triggered by providing a crafted image element in the input when generating files via the --extract-media option or outputting to PDF format. This allows an attacker to create or overwrite arbitrary files, depending on the privileges of the process running Pandoc. It only affects systems that pass untrusted user input to Pandoc and allow Pandoc to be used to produce a PDF or with the --extract-media option. NOTE: this issue exists because of an incomplete fix for CVE-2023-35936 (failure to properly account for double encoded path names).","modified":"2026-05-20T16:13:47.013553015Z","published":"2023-07-25T04:15:00Z","upstream":["CVE-2023-38745"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2023-38745"},{"type":"REPORT","url":"https://github.com/jgm/pandoc/commit/eddedbfc14916aa06fc01ff04b38aeb30ae2e625"},{"type":"REPORT","url":"https://github.com/jgm/pandoc/compare/3.1.5...3.1.6"},{"type":"REPORT","url":"https://github.com/jgm/pandoc/commit/eddedbfc14916aa06fc01ff04b38aeb30ae2e625"},{"type":"REPORT","url":"https://lists.debian.org/debian-lts-announce/2023/07/msg00029.html"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2023-38745"}],"affected":[{"package":{"name":"pandoc","ecosystem":"Ubuntu:14.04:LTS","purl":"pkg:deb/ubuntu/pandoc?arch=source&distro=trusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.11.1-2build2","1.11.1-4","1.11.1-5","1.12.2.1-1","1.12.2.1-1build1","1.12.2.1-1build2"],"ecosystem_specific":{"binaries":[{"binary_name":"libghc-pandoc-prof","binary_version":"1.12.2.1-1build2"},{"binary_name":"pandoc","binary_version":"1.12.2.1-1build2"},{"binary_version":"1.12.2.1-1build2","binary_name":"pandoc-data"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-38745.json"}},{"package":{"name":"pandoc","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/pandoc?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.13.2.1~dfsg-1build6","1.15.1.1~dfsg-2","1.15.1.1~dfsg-2build1","1.16.0.2~dfsg-1"],"ecosystem_specific":{"binaries":[{"binary_version":"1.16.0.2~dfsg-1","binary_name":"libghc-pandoc-prof"},{"binary_version":"1.16.0.2~dfsg-1","binary_name":"pandoc"},{"binary_name":"pandoc-data","binary_version":"1.16.0.2~dfsg-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-38745.json"}},{"package":{"name":"pandoc","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/pandoc?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.19.2.1.0-1","1.19.2.4~dfsg-1build1","1.19.2.4~dfsg-1build2","1.19.2.4~dfsg-1build3","1.19.2.4~dfsg-1build4"],"ecosystem_specific":{"binaries":[{"binary_name":"libghc-pandoc-prof","binary_version":"1.19.2.4~dfsg-1build4"},{"binary_name":"pandoc","binary_version":"1.19.2.4~dfsg-1build4"},{"binary_version":"1.19.2.4~dfsg-1build4","binary_name":"pandoc-data"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-38745.json"}},{"package":{"name":"pandoc","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/pandoc?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5-2","2.5-3","2.5-3build1","2.5-3build2"],"ecosystem_specific":{"binaries":[{"binary_name":"libghc-pandoc-prof","binary_version":"2.5-3build2"},{"binary_version":"2.5-3build2","binary_name":"pandoc"},{"binary_name":"pandoc-data","binary_version":"2.5-3build2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-38745.json"}},{"package":{"name":"pandoc","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/pandoc?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.9.2.1-1ubuntu4","2.9.2.1-3ubuntu1","2.9.2.1-3ubuntu2"],"ecosystem_specific":{"binaries":[{"binary_version":"2.9.2.1-3ubuntu2","binary_name":"libghc-pandoc-prof"},{"binary_name":"pandoc","binary_version":"2.9.2.1-3ubuntu2"},{"binary_name":"pandoc-data","binary_version":"2.9.2.1-3ubuntu2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-38745.json"}},{"package":{"name":"pandoc","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/pandoc?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.17.1.1-3ubuntu1","3.0.1+ds-3","3.1.3+ds-1","3.1.3+ds-2"],"ecosystem_specific":{"binaries":[{"binary_version":"3.1.3+ds-2","binary_name":"pandoc"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-38745.json"}},{"package":{"name":"pandoc","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/pandoc?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.11.1+ds-2","3.1.11.1+ds-4"],"ecosystem_specific":{"binaries":[{"binary_version":"3.1.11.1+ds-4","binary_name":"pandoc"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-38745.json"}},{"package":{"name":"pandoc","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/pandoc?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.1.11.1+ds-4","3.7.0.2+ds-1"],"ecosystem_specific":{"binaries":[{"binary_name":"pandoc","binary_version":"3.7.0.2+ds-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-38745.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}