Skip to content
TrackCVE
  • Newest CVEsPage
  • Recently added to KEVPage
  • Rising exploitation (EPSS)Page
  • Weekly digestPage
  • StatisticsPage
  • WatchlistPage
  • API documentationPage
  • MCP serverPage
  • Data sourcesPage
  • ChangelogPage
  • AboutPage
  • How it's builtPage
Back

CVE-2023-35936

Arbitrary file write is possible in Pandoc when using PDF output or --extract-media with untrusted input

Medium6.0EPSS 0.37%
Published
Updated
Reserved
Assigned by
GitHub_M

Description

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. Starting in version 1.13 and prior to version 3.1.4, Pandoc is susceptible to an arbitrary file write vulnerability, which can be triggered by providing a specially crafted image element in the input when generating files using the `--extract-media` option or outputting to PDF format. This vulnerability allows an attacker to create or overwrite arbitrary files on the system ,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. The fix is to unescape the percent-encoding prior to checking that the resource is not above the working directory, and prior to extracting the extension. Some code for checking that the path is below the working directory was flawed in a similar way and has also been fixed. Note that the `--sandbox` option, which only affects IO done by readers and writers themselves, does not block this vulnerability. The vulnerability is patched in pandoc 3.1.4. As a workaround, audit the pandoc command and disallow PDF output and the `--extract-media` option.

Timeline

  1. ID reserved

    By GitHub_M

  2. · 15 days later

    Published

  3. · 20 months later

    Record updated

Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.

Scores

CVSS scores of CVE-2023-35936, by who scored it
Scored byCVSSScoreVector
GitHub_MCNA (assigner)3.1Medium6.0CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:L
NVDNVD · Modified3.1Medium5.0CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:L
EPSS (exploitation in 30 days)
0.37% · top 69% of all CVEs (7 Nov 2026)
Loading the EPSS history…

The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.0.

Weakness

Affected products

References (5)

Sources

The same CVE in the primary databases and aggregators, to check against.

Badge for a README or a ticket

CVE-2023-35936 badge
[![CVE-2023-35936](https://trackcve.app/badge/CVE-2023-35936.svg)](https://trackcve.app/cve/CVE-2023-35936)

Record last updated .