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.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 0.368% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T16:57:41.748Z. Public exploit availability is not used to set this status.
CVSS 3.1 · 6 · published by GitHub_MCVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:L
Assessment source · checked 2026-11-19T12:56:55.596Z
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T16:57:41.748Z | CISA KEV |
| cvss | verified | 2026-11-19T12:56:55.596Z | CVE Program |
| epss | verified | 2026-11-19T16:04:36.838Z | FIRST EPSS |
| patches | verified | 2026-11-19T12:52:55.687Z | OSV |
| affected | verified | 2026-11-19T12:56:55.596Z | CVE Program |
| lifecycle | verified | 2026-11-19T12:56:55.596Z | CVE Program |
Affected versions and configuration
jgm pandoc; default status: unknown: >= 1.13, < 3.1.4 [affected; scheme: unspecified]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
CVE Program · cve-json · full conditions
{
"affected": [
{
"vendor": "jgm",
"product": "pandoc",
"versions": [
{
"status": "affected",
"version": ">= 1.13, < 3.1.4"
}
]
}
],
"additionalContainers": [
{
"title": "CVE Program Container",
"references": [
{
"url": "https://github.com/jgm/pandoc/security/advisories/GHSA-xj5q-fv23-575g",
"name": "https://github.com/jgm/pandoc/security/advisories/GHSA-xj5q-fv23-575g",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
]
},
{
"url": "https://lists.debian.org/debian-lts-announce/2023/07/msg00029.html",
"tags": [
"x_transferred"
]
},
{
"url": "https://lists.fedoraproject.org/archives/list/[email protected]/message/QI6RBP6ZKVC2OOCV6SU2FUHPMAXDDJFU/",
"tags": [
"x_transferred"
]
},
{
"url": "https://lists.fedoraproject.org/archives/list/[email protected]/message/JGRJHU2FTSGTHHRTNDF7STEKLKKA25JN/",
"tags": [
"x_transferred"
]
},
{
"url": "https://lists.fedoraproject.org/archives/list/[email protected]/message/LYP3FKDS3KAYMQUZVVL73IUI4CWSKLKP/",
"tags": [
"x_transferred"
]
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2024-08-02T16:37:40.588Z"
}
}
]
}Archived source JSONOSV · osv · full conditions
{
"id": "HSEC-2023-0014",
"aliases": [
"CVE-2023-35936",
"GHSA-xj5q-fv23-575g"
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "1.13"
},
{
"fixed": "3.1.4"
}
]
}
],
"package": {
"name": "pandoc",
"purl": "pkg:hackage/pandoc",
"ecosystem": "Hackage"
},
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:L"
}
],
"versions": [
"1.13",
"1.13.0.1",
"1.13.1",
"1.13.2",
"1.13.2.1",
"1.14",
"1.14.0.1",
"1.14.0.2",
"1.14.0.3",
"1.14.0.4",
"1.14.1",
"1.15",
"1.15.0.1",
"1.15.0.2",
"1.15.0.3",
"1.15.0.4",
"1.15.0.5",
"1.15.0.6",
"1.15.1",
"1.15.1.1",
"1.15.2",
"1.15.2.1",
"1.16",
"1.16.0.1",
"1.16.0.2",
"1.17",
"1.17.0.1",
"1.17.0.2",
"1.17.0.3",
"1.17.1",
"1.17.2",
"1.18",
"1.19",
"1.19.1",
"1.19.2",
"1.19.2.1",
"1.19.2.2",
"1.19.2.3",
"1.19.2.4",
"2.0",
"2.0.0.1",
"2.0.1",
"2.0.1.1",
"2.0.2",
"2.0.3",
"2.0.4",
"2.0.5",
"2.0.6",
"2.1",
"2.1.1",
"2.1.2",
"2.1.3",
"2.10",
"2.10.1",
"2.11",
"2.11.0.1",
"2.11.0.2",
"2.11.0.3",
"2.11.0.4",
"2.11.1",
"2.11.1.1",
"2.11.2",
"2.11.3",
"2.11.3.1",
"2.11.3.2",
"2.11.4",
"2.12",
"2.13",
"2.14",
"2.14.0.1",
"2.14.0.2",
"2.14.0.3",
"2.14.1",
"2.14.2",
"2.15",
"2.16",
"2.16.1",
"2.16.2",
"2.17",
"2.17.0.1",
"2.17.1",
"2.17.1.1",
"2.18",
"2.19",
"2.19.1",
"2.19.2",
"2.2",
"2.2.1",
"2.2.2",
"2.2.2.1",
"2.2.3",
"2.2.3.1",
"2.2.3.2",
"2.3",
"2.3.1",
"2.4",
"2.5",
"2.6",
"2.7",
"2.7.1",
"2.7.2",
"2.7.3",
"2.8",
"2.8.0.1",
"2.8.1",
"2.9",
"2.9.1",
"2.9.1.1",
"2.9.2",
"2.9.2.1",
"3.0",
"3.0.1",
"3.1",
"3.1.1",
"3.1.2",
"3.1.3"
],
"database_specific": {
"osv": "https://raw.githubusercontent.com/haskell/security-advisories/refs/heads/generated/osv-export/2023/HSEC-2023-0014.json",
"source": "https://github.com/haskell/security-advisories/blob/generated/osv-export/2023/HSEC-2023-0014.json",
"human_link": "https://github.com/haskell/security-advisories/tree/main/advisories/published/2023/HSEC-2023-0014.md"
}
}
],
"severity": [],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/jgm/pandoc/security/advisories/GHSA-xj5q-fv23-575g",
"type": "REPORT"
}
],
"relatedGitRanges": [],
"database_specific": {
"home": "https://github.com/haskell/security-advisories",
"osvs": "https://raw.githubusercontent.com/haskell/security-advisories/refs/heads/generated/osv-export",
"repository": "https://github.com/haskell/security-advisories"
}
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
| Evidence type | Distribution / release | Package | Channel | Version or source note | Source |
|---|---|---|---|---|---|
| ecosystem-boundary | Hackage / package | pandoc | Not a distribution channel | 3.1.4 | Official record |
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- OSVConsulted: 2026-11-19T12:52:55.687ZArchived source JSON
Source publication: 2025-11-14T14:45:34.000Z
Source modification: 2025-11-14T18:15:39.254ZDocument fingerprint
d369ac86dd91135fd5c4d3ab0fe37f755536b0e17ae4853c8a5875aa87303707 - CVE ProgramConsulted: 2026-11-19T12:56:55.596ZArchived source JSON
Source publication: 2023-07-05T20:37:56.394Z
Source modification: 2025-02-13T16:55:56.804ZDocument fingerprint
10ada84dc9e3dc1746e125113d99b031082a2428242e241843bd119ee460cbb5 - CISA KEVConsulted: 2026-11-19T16:57:41.748ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56 - FIRST EPSSConsulted: 2026-11-19T16:04:36.838ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
752b5a4ab7063ebae6041b8a2218e2c7a480f9f66d4152a818c6a0713b1fa460
Official status history
- UNKNOWN → PUBLISHED · · evidence