CVE-2023-38745
MediumCVSS 6.3Exploitation Probability (EPSS)
Low risk16th percentile - higher than 16% of all known CVEs
Summary
Pandoc versions before 3.1.6 allow arbitrary file write, which 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.
Risk Assessment
An attacker can create or overwrite arbitrary files depending on the privileges of the process running Pandoc, posing a serious security risk to systems processing untrusted input.
Recommendation
It is recommended to update Pandoc to version 3.1.6 or later and to avoid processing untrusted input, especially when using the --extract-media option or generating PDF files.
Other vulnerabilities in Pandoc
See all- CVE-2025-51591Low
An SSRF vulnerability in JGM Pandoc v3.6.4 allows attackers to inject a crafted iframe, gaining access to and compromising the entire infrastructure. Pandoc's default behavior of fetching and parsing untrusted HTML can facilitate exploitation of this flaw.
- CVE-2023-35936Medium
Pandoc, a Haskell library for converting markup formats, has an arbitrary file write vulnerability that can be triggered by a specially crafted image element in the input. This affects versions from 1.13 to 3.1.4 when generating files using the `--extract-media` option or outputting to PDF format.
Original NVD description (English source)
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).
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

