CVE-2025-59801
Ghostscript vulnerability analysis and mitigation

Overview

A stack-based buffer overflow vulnerability was discovered in Artifex GhostXPS before version 10.06.0, identified as CVE-2025-59801. The vulnerability exists in the xpsunpredicttiff function in xpstiff.c due to insufficient validation of the samplesperpixel value. The issue affects the XPS document processing functionality of GhostXPS (Ghostscript Bug).

Technical details

The vulnerability stems from a lack of bounds checking on the samplesperpixel parameter in the xpsunpredicttiff function. The function uses a fixed-size array of 32 bytes but fails to validate the samplesperpixel value, allowing an attacker to trigger a stack-based buffer overflow. The XPS specification only permits SamplesPerPixel values of 1, 3, 4, or 5, but this validation was missing in the affected versions (Ghostscript Commit).

Impact

The vulnerability could potentially lead to remote code execution (RCE) when processing maliciously crafted XPS files. However, successful exploitation would require bypassing modern security protections such as ASLR and stack canaries, likely requiring additional information leak vulnerabilities to achieve full RCE (Ghostscript Bug).

Mitigation and workarounds

The vulnerability has been patched in GhostXPS version 10.06.0. The fix implements proper validation of TIFF values, including checks for SamplesPerPixel, BitsPerSample, and Compression values. Users should upgrade to version 10.06.0 or later to address this vulnerability (Ghostscript Commit).

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-7462MEDIUM5.3
  • GhostscriptGhostscript
  • ghostscript
NoYesJul 12, 2025
CVE-2025-59801MEDIUM4.3
  • GhostscriptGhostscript
  • ghostscript
NoNoSep 22, 2025
CVE-2025-59800MEDIUM4.3
  • GhostscriptGhostscript
  • cpe:2.3:a:artifex:ghostscript
NoNoSep 22, 2025
CVE-2025-59799MEDIUM4.3
  • GhostscriptGhostscript
  • cpe:2.3:a:artifex:ghostscript
NoNoSep 22, 2025
CVE-2025-59798MEDIUM4.3
  • GhostscriptGhostscript
  • ghostscript
NoNoSep 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