LiveActive security incident?Get immediate response
CVE Record

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

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.

MediumCVSS 6Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

Pandoc could be tricked into creating or overwriting files when converting untrusted documents to PDF or when using --extract-media. The impact depends on the account running Pandoc. This is most urgent for services that accept user-submitted documents and automatically convert them.

Executive priority

Prioritize patching internet-facing or customer-facing document conversion services first. Business risk is file tampering on the conversion host, not confirmed widespread exploitation.

Technical view

CVE-2023-35936 affects Pandoc versions 1.13 before 3.1.4. A crafted image element can trigger arbitrary file write during PDF generation or --extract-media processing. The flaw involves percent-encoding being checked too late in path validation. Pandoc --sandbox does not block this issue.

Likely exposure

Exposure is limited to systems running affected Pandoc versions that process untrusted input and produce PDFs or use --extract-media. Internal documentation pipelines processing trusted files only are lower risk.

Exploitation context

The source bundle does not show CISA KEV listing or active exploitation. Exploitation requires crafted input reaching a vulnerable Pandoc workflow and can write files with the Pandoc process privileges.

Researcher notes

Treat this as input validation failure, CWE-20, in Pandoc resource path handling. The advisory states path checks failed around percent-encoding and working-directory boundary checks. Avoid publishing payload details.

Mitigation direction

  • Upgrade Pandoc to version 3.1.4 or a fixed vendor package.
  • Audit Pandoc commands for PDF output and --extract-media usage.
  • Disallow PDF output for untrusted input until patched.
  • Disable --extract-media for untrusted input until patched.
  • Do not rely on Pandoc --sandbox as mitigation.

Validation and detection

  • Inventory installed Pandoc versions across servers and build systems.
  • Identify services accepting user-supplied documents for Pandoc conversion.
  • Check whether those workflows produce PDF output.
  • Check whether those workflows use --extract-media.
  • Confirm patched Debian, Fedora, or upstream packages are deployed.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-20: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

File access behavior lookup

The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2023-35936 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:L

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
6Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6CVSS 3.1MediumCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:L0.84.7Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6Medium
CVSS 3.1 vector shape for CVE-2023-35936Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:L

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
jgmpandoc>= 1.13, < 3.1.4Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-20 · source CWE mapping

Improper Input Validation

Improper Input Validation represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.