CVE-2025-59799
Ghostscript vulnerability analysis and mitigation

Overview

A stack-based buffer overflow vulnerability was discovered in Artifex Ghostscript through version 10.05.1, identified as CVE-2025-59799. The vulnerability exists in the pdfmark_coerce_dest function within devices/vector/gdevpdfm.c, which can be triggered via a large size value. The issue was discovered on May 7, 2025, and was publicly disclosed on September 22, 2025 (NVD, Ghostscript Bug).

Technical details

The vulnerability stems from a stack-based buffer overflow in the pdfmark_coerce_dest function where a destination buffer is statically allocated on the stack without proper bounds checking before the memcpy call. The issue has received a CVSS v3.1 base score of 5.5 (Medium) from NVD with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H, while MITRE assigned a score of 4.3 (Medium) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N (NVD).

Impact

The buffer overflow vulnerability can lead to stack memory corruption when processing PDF files with specially crafted pdfmark code. This could potentially result in program crashes or other undefined behavior when processing malicious PDF documents (Ghostscript Bug).

Mitigation and workarounds

The vulnerability has been fixed in the Ghostscript codebase through commit 6dab38fb211f15226c242ab7a83fa53e4b0ff781, which added proper size checking before the buffer copy operation. Ubuntu has released fixes for versions 25.04, 24.04 LTS, and 22.04 LTS in update 10.05.0dfsg1-0ubuntu1.2 (Ubuntu 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
  • GhostscriptGhostscript
  • ghostscript-x11-debuginfo
NoYesSep 22, 2025
CVE-2025-59799MEDIUM5.5
  • GhostscriptGhostscript
  • ghostscript-tools-printing
NoYesSep 22, 2025
CVE-2025-59798MEDIUM5.5
  • GhostscriptGhostscript
  • libgs
NoYesSep 22, 2025
CVE-2025-7462MEDIUM5.3
  • GhostscriptGhostscript
  • ghostscript-gtk
NoYesJul 12, 2025
CVE-2025-59801MEDIUM4.3
  • GhostscriptGhostscript
  • ghostscript
NoYesSep 22, 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