cve.bz

CVE-2023-35936 Improper Input Validation

5.0 mediumExploit referenceEPSS 0.4%

Medium (5.0). EPSS 0.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

5.0 medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:L
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 31st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-20 Improper Input Validation
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-35936 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-35936?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-35936?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-35936 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
pandoc:pandocfrom 1.13 before 3.1.4
debian:debian_linux10.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10pandoc2.2.1-3+deb10u1DLA-3507-1
Debian12pandoc2.17.1.1-2~deb12u1DEBIAN-CVE-2023-35936
Debian13, 14haskell-pandoc3.0.1-2DEBIAN-CVE-2023-35936
Debian13, 14pandoc2.17.1.1-2DEBIAN-CVE-2023-35936
Ubuntu14.04:LTS, 16.04:LTS, 18.04:LTS and 6 morepandocno fix listedUBUNTU-CVE-2023-35936

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8pandocWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-35936.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON