CVE-2023-38745: n/a
Pandoc before 3.1.6 allows arbitrary file write: this can be triggered by providing a crafted image element in the input when generating files via the --extract-media option or outputting to PDF format. This allows an attacker to create or overwrite arbitrary files, 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. NOTE: this issue exists because of an incomplete fix for CVE-2023-35936 (failure to properly account for double encoded path names).
AI Analysis
Technical Summary
CVE-2023-38745 is a security vulnerability affecting Pandoc, a widely used document converter, in versions before 3.1.6. The vulnerability enables an attacker to perform arbitrary file writes on the host system by supplying a crafted image element in the input when generating files using the --extract-media option or when outputting to PDF format. This occurs because Pandoc fails to properly sanitize and handle double encoded path names, a flaw that persisted due to an incomplete fix of a previous vulnerability (CVE-2023-35936). When Pandoc processes the malicious input, it can write files to arbitrary locations on the filesystem, potentially overwriting critical files or planting malicious payloads. The impact depends on the privileges of the Pandoc process; if run with elevated rights, the attacker could gain significant control over the system. Exploitation requires that untrusted user input is passed to Pandoc and that the application is configured to produce PDFs or extract media files, which is common in automated document processing workflows. There are no known exploits in the wild at the time of publication, but the vulnerability poses a serious risk given Pandoc's popularity in academic, publishing, and software development environments. The lack of a CVSS score necessitates an independent severity assessment, considering the ease of exploitation (no user interaction needed beyond input submission), the scope (arbitrary file write), and the potential impact on confidentiality, integrity, and availability.
Potential Impact
For European organizations, the arbitrary file write vulnerability in Pandoc could lead to unauthorized modification or creation of files, enabling attackers to implant malicious code, alter documents, or disrupt services. This is particularly concerning for institutions that automate document generation or conversion from untrusted sources, such as universities, research centers, publishing houses, and software companies. If exploited, attackers could escalate privileges, compromise sensitive data, or disrupt business operations. The impact is amplified in environments where Pandoc runs with elevated privileges or on critical infrastructure. Additionally, the ability to overwrite files could facilitate further attacks, including ransomware deployment or persistent backdoors. Given the widespread use of Pandoc in Europe, especially in academic and technical sectors, the threat could affect a broad range of organizations, potentially leading to data breaches, reputational damage, and operational downtime.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should immediately upgrade Pandoc to version 3.1.6 or later, where the issue is fixed. Organizations should audit their document processing workflows to identify any use of Pandoc with untrusted input, especially where the --extract-media option or PDF output is involved. Restricting the execution context of Pandoc to least privilege environments reduces the risk of severe impact. Implement input validation and sanitization to prevent malicious crafted inputs from reaching Pandoc. Where possible, isolate document conversion processes in sandboxed or containerized environments to limit filesystem access. Monitoring and logging Pandoc usage can help detect anomalous activity. Finally, organizations should review and update their incident response plans to include scenarios involving document processing vulnerabilities.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Belgium, Italy, Spain
CVE-2023-38745: n/a
Description
Pandoc before 3.1.6 allows arbitrary file write: this can be triggered by providing a crafted image element in the input when generating files via the --extract-media option or outputting to PDF format. This allows an attacker to create or overwrite arbitrary files, 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. NOTE: this issue exists because of an incomplete fix for CVE-2023-35936 (failure to properly account for double encoded path names).
AI-Powered Analysis
Technical Analysis
CVE-2023-38745 is a security vulnerability affecting Pandoc, a widely used document converter, in versions before 3.1.6. The vulnerability enables an attacker to perform arbitrary file writes on the host system by supplying a crafted image element in the input when generating files using the --extract-media option or when outputting to PDF format. This occurs because Pandoc fails to properly sanitize and handle double encoded path names, a flaw that persisted due to an incomplete fix of a previous vulnerability (CVE-2023-35936). When Pandoc processes the malicious input, it can write files to arbitrary locations on the filesystem, potentially overwriting critical files or planting malicious payloads. The impact depends on the privileges of the Pandoc process; if run with elevated rights, the attacker could gain significant control over the system. Exploitation requires that untrusted user input is passed to Pandoc and that the application is configured to produce PDFs or extract media files, which is common in automated document processing workflows. There are no known exploits in the wild at the time of publication, but the vulnerability poses a serious risk given Pandoc's popularity in academic, publishing, and software development environments. The lack of a CVSS score necessitates an independent severity assessment, considering the ease of exploitation (no user interaction needed beyond input submission), the scope (arbitrary file write), and the potential impact on confidentiality, integrity, and availability.
Potential Impact
For European organizations, the arbitrary file write vulnerability in Pandoc could lead to unauthorized modification or creation of files, enabling attackers to implant malicious code, alter documents, or disrupt services. This is particularly concerning for institutions that automate document generation or conversion from untrusted sources, such as universities, research centers, publishing houses, and software companies. If exploited, attackers could escalate privileges, compromise sensitive data, or disrupt business operations. The impact is amplified in environments where Pandoc runs with elevated privileges or on critical infrastructure. Additionally, the ability to overwrite files could facilitate further attacks, including ransomware deployment or persistent backdoors. Given the widespread use of Pandoc in Europe, especially in academic and technical sectors, the threat could affect a broad range of organizations, potentially leading to data breaches, reputational damage, and operational downtime.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should immediately upgrade Pandoc to version 3.1.6 or later, where the issue is fixed. Organizations should audit their document processing workflows to identify any use of Pandoc with untrusted input, especially where the --extract-media option or PDF output is involved. Restricting the execution context of Pandoc to least privilege environments reduces the risk of severe impact. Implement input validation and sanitization to prevent malicious crafted inputs from reaching Pandoc. Where possible, isolate document conversion processes in sandboxed or containerized environments to limit filesystem access. Monitoring and logging Pandoc usage can help detect anomalous activity. Finally, organizations should review and update their incident response plans to include scenarios involving document processing vulnerabilities.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mitre
- Date Reserved
- 2023-07-25T00:00:00.000Z
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 690a439d6d939959c8fddaf6
Added to database: 11/4/2025, 6:19:09 PM
Last enriched: 11/4/2025, 6:35:35 PM
Last updated: 11/6/2025, 1:39:16 PM
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2024-5651: Improper Control of Generation of Code ('Code Injection')
HighCVE-2024-57520: n/a
CriticalCVE-2025-11268: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in wpchill Strong Testimonials
MediumCVE-2025-12360: CWE-285 Improper Authorization in codesolz Better Find and Replace – AI-Powered Suggestions
MediumCVE-2025-10259: CWE-1284 Improper Validation of Specified Quantity in Input in Mitsubishi Electric Corporation MELSEC iQ-F Series FX5U-32MT/ES
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.