CVE-2023-35936: Arbitrary File Write Vulnerability in Pandoc

pandoc Updated 02 Oct 2025

Summary

22/08/2023
Yes i
Unrated
Not published

CVE-2023-35936: Arbitrary file write is possible when using PDF output or --extract-media with untrusted input. Affects pandoc versions >= 1.13, < 3.1.4. Fixed in 3.1.4. How to fix ↓

Also tracked for

The same CVE-2023-35936 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Pandoc is a document conversion tool that allows users to convert files from one markup format to another. It supports a wide range of formats, including HTML, Markdown, LaTeX, and PDF. Pandoc is commonly used in various applications and workflows to generate documents in different formats.

Vulnerability Detail

Pandoc is susceptible to an arbitrary file write vulnerability when using the PDF output or the --extract-media option with untrusted input. This vulnerability can be exploited by providing a specially crafted image element in the input. Attackers can leverage this vulnerability to create or overwrite arbitrary files on the system, depending on the privileges of the process running Pandoc. It is important to note that this vulnerability only affects systems that pass untrusted user input to Pandoc and allow the generation of PDF files or the use of the --extract-media option.

How To Fix

Minimum fixed version

3.1.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, users can follow the recommended fix by updating Pandoc to version 3.1.4.

Conclusion

Pandoc is susceptible to an arbitrary file write vulnerability when using the PDF output or the --extract-media option with untrusted input. This vulnerability can be exploited to create or overwrite arbitrary files on the system. Users are advised to update their Pandoc installations to version 3.1.4 to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for pandoc →

Share this vulnerability

FAQ

This vulnerability allows attackers to create or overwrite arbitrary files on the system, potentially leading to unauthorized access, data loss, or system compromise.

This vulnerability affects systems that pass untrusted user input to Pandoc and allow the generation of PDF files or the use of the --extract-media option.

There are no known exploits for this vulnerability at the time of this advisory.

Yes, the vulnerability has been patched in Pandoc version 3.1.4. Users should update their installations to the latest version.

No specific workaround is mentioned for this vulnerability. It is recommended to update Pandoc to the latest version to mitigate the risk.

Related vulnerabilities

Recent vulnerabilities recorded for pandoc.

How To Fix

Minimum fixed version

3.1.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback