CVE-2024-29509
Ghostscript vulnerability analysis and mitigation

Overview

CVE-2024-29509 affects Artifex Ghostscript versions before 10.03.0, discovered and disclosed in July 2024. The vulnerability involves a heap-based buffer overflow condition in the PDFPassword parameter handling functionality, specifically when processing passwords containing null bytes in the middle of the string (NVD, OpenWall).

Technical details

The vulnerability occurs in the runpdf command's PDF interpreter when handling the PDFPassword parameter. During the decryption process in check_password_R5 function within pdf_sec.c, a buffer is allocated based on the string length of the password field, but the subsequent memcpy operation copies the full length of the PS-supplied object into this buffer. This mismatch leads to a heap buffer overflow when a PDFPassword value contains a null byte in the middle, as PS-strings are not null-terminated (OpenWall). The vulnerability has been assigned a CVSS v3.1 base score of 8.8 (High) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (NVD).

Impact

The vulnerability can lead to heap buffer overflow conditions, potentially resulting in arbitrary code execution, system crashes, or memory corruption. The high CVSS score indicates significant potential impact on the confidentiality, integrity, and availability of affected systems (NVD).

Exploitability

The vulnerability can be triggered by providing a specially crafted PDFPassword parameter containing a null byte in the middle. For example, using the PostScript command /PDFPassword (foo\000bar) def will result in a memcpy of 7 bytes into a buffer of size 3, causing the overflow (OpenWall).

Mitigation and workarounds

The vulnerability has been fixed in Ghostscript version 10.03.0 released on March 6, 2024. Users are advised to upgrade to this version or later to mitigate the vulnerability. The fix was implemented through commit 917b3a71fb20748965254631199ad98210d6c2fb in the Ghostscript repository (Debian Security).

Additional resources


SourceThis report was generated using AI

Related Ghostscript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59800MEDIUM5.5
  • Ghostscript logoGhostscript
  • ghostscript-cups
NoYesSep 22, 2025
CVE-2025-59799MEDIUM5.5
  • Ghostscript logoGhostscript
  • libgs-debuginfo
NoYesSep 22, 2025
CVE-2025-59798MEDIUM5.5
  • Ghostscript logoGhostscript
  • ghostscript-gtk
NoYesSep 22, 2025
CVE-2025-59801MEDIUM4.3
  • Ghostscript logoGhostscript
  • ghostscript-devel
NoYesSep 22, 2025
CVE-2026-6192LOW1.9
  • Ghostscript logoGhostscript
  • blender
NoYesApr 13, 2026

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