CVE-2023-38745
NixOS vulnerability analysis and mitigation

Overview

CVE-2023-38745 is a vulnerability in Pandoc versions before 3.1.6 that allows arbitrary file write through crafted image elements. This vulnerability emerged as an incomplete fix for CVE-2023-35936, specifically failing to properly account for double encoded path names. The issue affects systems that pass untrusted user input to Pandoc and allow it to be used to produce a PDF or with the --extract-media option (NVD, Debian LTS).

Technical details

The vulnerability is triggered when providing a specially crafted image element in the input when generating files via the --extract-media option or outputting to PDF format. The core issue lies in the handling of double-encoded path names, where an attacker could bypass the previous security fix by encoding '%' characters as '%25'. This allows for path traversal and arbitrary file writes on the system. The vulnerability has a CVSS v3.1 Base Score of 6.3 (Medium) with vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H (NVD).

Impact

When exploited, this vulnerability allows an attacker to create or overwrite arbitrary files on the system, with the scope of impact determined by the privileges of the process running Pandoc. This is particularly concerning for systems that process untrusted user input through Pandoc's PDF generation or media extraction features (NVD, Debian LTS).

Mitigation and workarounds

The vulnerability has been fixed in Pandoc version 3.1.6. The fix involves using the SHA1 hash of the contents as the canonical name if the URL-unescaped filename or extension contains a '%' character, similar to how paths containing '..' are handled. Users are strongly recommended to upgrade to version 3.1.6 or later (GitHub Commit, Debian LTS).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61619HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61618HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61617HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61610HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61609HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management