☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-59801

CVE-2025-59801 Stack Buffer Overflow in Artifex
📅 PUBLISHED: 2025-09-22 00:00 UTC 🔄 UPDATED: 2026-09-23 10:16 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.20%
👁️
0.20% probability
5.0× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
4.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-59801 is a stack-based buffer overflow vulnerability in Artifex GhostXPS, a tool for processing XPS (XML Paper Specification) files. The flaw resides in the xps_unpredict_tiff function within xpstiff.c. The vulnerability arises because the samplesperpixel value from a TIFF image embedded in an XPS file is not validated before being used in a stack buffer operation. An attacker can craft a malicious XPS file with an excessively large samplesperpixel value, causing a stack buffer overflow when GhostXPS attempts to process it. This can lead to a denial of service (DoS) condition, and potentially arbitrary code execution in the context of the user running the application. The CVSS score is 4.3 (Medium), with a local attack vector and high availability impact. No public exploit code or proof-of-concept is currently available, but the vulnerability is considered unpatched in versions prior to 10.06.0.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not in a package manager ecosystem (NPM, PyPI, Go, Ruby). It affects the standalone GhostXPS binary, which is part of the Artifex Ghostscript suite. Users should verify the integrity of their GhostXPS installation and ensure it is obtained from official sources.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
  • Base Score: 4.3 (Medium)
  • Attack Vector (AV): Local (L) – The attacker must have local access to the system or trick a user into opening a malicious file.
  • Attack Complexity (AC): Low (L) – No special conditions are required to exploit the vulnerability.
  • Privileges Required (PR): None (N) – No authentication is needed.
  • User Interaction (UI): Required (R) – The victim must open the malicious XPS file.
  • Scope (S): Unchanged (U) – The vulnerability does not affect resources beyond the vulnerable component.
  • Confidentiality (C): None (N) – No data is exposed.
  • Integrity (I): None (N) – No data is modified.
  • Availability (A): High (H) – The vulnerability can cause a complete denial of service.

Threat Level: Medium. While the CVSS score is moderate, the potential for code execution elevates the risk. The lack of a public exploit reduces immediate threat, but the vulnerability is unpatched in many deployments.

Deep Dive & Mechanics

The vulnerability is a classic stack-based buffer overflow in the xps_unpredict_tiff function. This function is responsible for decoding TIFF images embedded within XPS files. The XPS format allows embedding TIFF images, and the TIFF specification includes a tag (SamplesPerPixel) that defines the number of color components per pixel (e.g., 1 for grayscale, 3 for RGB, 4 for CMYK).

The vulnerable code path does not validate the samplesperpixel value before using it to calculate a buffer size on the stack. When a malicious XPS file specifies an extremely large samplesperpixel value (e.g., 0xFFFF), the calculation samplesperpixel * width * height can overflow a 32-bit integer, leading to a small buffer allocation. Subsequently, when the function writes pixel data into this undersized buffer, it overflows the stack, corrupting adjacent memory.

The overflow can overwrite the return address and other critical data on the stack, potentially allowing an attacker to redirect execution flow to arbitrary code. The attack is triggered when a user opens the crafted XPS file with GhostXPS.

Vulnerable vs. Patched Code

The fix in version 10.06.0 likely adds a bounds check on the samplesperpixel value before it is used in buffer calculations.

Vulnerable Code (Conceptual):

// In xps_unpredict_tiff
int samplesperpixel = get_tiff_tag_value(tiff, TAG_SAMPLESPERPIXEL);
int width = get_tiff_tag_value(tiff, TAG_WIDTH);
int height = get_tiff_tag_value(tiff, TAG_HEIGHT);
// No validation of samplesperpixel
int buffer_size = samplesperpixel * width * height; // Potential integer overflow
unsigned char buffer[buffer_size]; // Stack buffer allocation
// ... later, data is written to buffer without size check

Patched Code (Conceptual):

// In xps_unpredict_tiff
int samplesperpixel = get_tiff_tag_value(tiff, TAG_SAMPLESPERPIXEL);
int width = get_tiff_tag_value(tiff, TAG_WIDTH);
int height = get_tiff_tag_value(tiff, TAG_HEIGHT);
// Validate samplesperpixel
if (samplesperpixel < 1 || samplesperpixel > 4) {
    // Error handling, reject the file
    return -1;
}
// Now safe from integer overflow
int buffer_size = samplesperpixel * width * height;
unsigned char buffer[buffer_size];
// ... data is written safely

Exploitation & Lab Setup

Red Team (Exploitation)

Objective: Achieve denial of service or arbitrary code execution by crafting a malicious XPS file.

Prerequisites:

  • A vulnerable version of GhostXPS (before 10.06.0).
  • Ability to deliver the malicious file to the target (e.g., via email, web download).

Steps:

  1. Craft the Malicious XPS File: Create an XPS file containing a TIFF image with an abnormally large SamplesPerPixel value. This can be done by manually editing the XPS package (which is a ZIP archive) or using a hex editor to modify the TIFF header within the XPS file.
  2. Deliver the File: Send the malicious XPS file to the target user.
  3. Trigger the Vulnerability: When the user opens the file with GhostXPS, the overflow occurs.
  4. Achieve Code Execution (Advanced): To achieve code execution, the attacker would need to carefully craft the overflow to overwrite the return address with a pointer to shellcode. This requires knowledge of the target system's memory layout and stack layout. The shellcode would be embedded in the XPS file itself.

Example Payload (Conceptual):

# This is a conceptual script to generate a malicious XPS file.
# It is not a working exploit.
import struct
import zipfile

# Create a minimal XPS file structure
# ... (omitted for brevity)

# Modify the TIFF header to set SamplesPerPixel to a large value
# For example, set it to 0xFFFF
# ... (omitted for brevity)

# Save the XPS file
# ...

Blue Team (Defense & Detection)

Objective: Detect and prevent exploitation of CVE-2025-59801.

Steps:

  1. Patch Management: Immediately update GhostXPS to version 10.06.0 or later.
  2. File Scanning: Deploy endpoint detection and response (EDR) solutions that can scan XPS files for anomalous TIFF headers.
  3. User Awareness: Train users not to open XPS files from untrusted sources.
  4. Network Monitoring: Monitor for unusual XPS file transfers, especially those with large file sizes or suspicious metadata.
  5. Application Control: Use application whitelisting to prevent unauthorized execution of GhostXPS.

Indicators of Compromise (IOCs)

  • File Hashes (Malicious XPS): (None publicly available, but would be generated by attackers)
  • Network Signatures: XPS files with abnormally large SamplesPerPixel values in embedded TIFF images.
  • Behavioral: GhostXPS process crash (segmentation fault) when processing an XPS file.
  • Registry/File System: Presence of unusual XPS files in temporary directories or email attachments.

Detection Engineering

YARA Rule

rule CVE_2025_59801_GhostXPS_TIFF_Overflow {
    meta:
        description = "Detects XPS files with potentially malicious TIFF SamplesPerPixel values"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2025-59801"
    strings:
        $xps_magic = { 50 4B 03 04 } // ZIP magic (XPS is a ZIP)
        $tiff_magic_le = { 49 49 2A 00 } // Little-endian TIFF
        $tiff_magic_be = { 4D 4D 00 2A } // Big-endian TIFF
        $samples_per_pixel_tag = { 01 02 } // Tag ID for SamplesPerPixel (0x0112)
    condition:
        $xps_magic at 0 and
        ( $tiff_magic_le or $tiff_magic_be ) and
        $samples_per_pixel_tag
}

Sigma Rule

title: CVE-2025-59801 GhostXPS Stack Buffer Overflow
id: 8a7b3c2d-1e5f-4a6b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects potential exploitation of CVE-2025-59801 via GhostXPS crash
author: Valters IT
date: 2025-04-10
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\ghostxps.exe'
        CommandLine|contains: '.xps'
    condition: selection
falsepositives:
    - Legitimate XPS file processing
level: medium

Suricata Rule

alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-59801 GhostXPS Malicious XPS File Transfer"; flow:to_server,established; content:"|50 4B 03 04|"; depth:4; content:"|49 49 2A 00|"; within:1024; content:"|01 02|"; within:256; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Action: Upgrade GhostXPS to version 10.06.0 or later. This is the only complete fix.
  2. Workaround: If an immediate upgrade is not possible, consider disabling the processing of XPS files or using an alternative XPS viewer.
  3. Compensating Controls:
    • Implement strict file upload validation to reject XPS files with suspicious TIFF headers.
    • Use sandboxing or containerization to isolate GhostXPS processes.
    • Deploy application-level firewalls that can inspect XPS file contents.
  4. Long-Term: Monitor vendor advisories for any additional patches or updates.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-59801/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.