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

CVE-2025-2574

CVE-2025-2574 Out-of-Bounds Access in Xpdf
📅 PUBLISHED: 2025-03-20 21:07 UTC 🔄 UPDATED: 2026-09-23 20:37 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm 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.16%
👁️
0.16% probability
3.9× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
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
2.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-2574 is a critical out-of-bounds (OOB) array write vulnerability in Xpdf versions 4.05 and earlier. The flaw resides in the PostScript function interpreter code, where incorrect integer overflow checking allows an attacker to write beyond allocated memory boundaries. This can lead to arbitrary code execution, denial of service, or data corruption. The vulnerability is unpatched, and no public exploit code or proof-of-concept is currently available. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains high due to the lack of a patch.

⚡ 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

Xpdf is a widely used open-source PDF viewer and toolkit, often integrated into larger applications and server-side document processing pipelines. The vulnerability affects all downstream consumers who bundle or rely on Xpdf 4.05 or earlier. Organizations using Xpdf in their software supply chain should treat this as a high-priority risk, as no official patch exists.

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (No official vector assigned)
  • Attack Vector (AV): Network (likely)
  • Attack Complexity (AC): Low (likely)
  • Privileges Required (PR): None (likely)
  • User Interaction (UI): Required (likely, to open a malicious PDF)
  • Scope (S): Unchanged (likely)
  • Confidentiality (C): High (likely)
  • Integrity (I): High (likely)
  • Availability (A): High (likely)

Threat Level: Critical (unpatched, OOB write, potential for RCE)

Deep Dive & Mechanics

The vulnerability is in the PostScript interpreter within Xpdf. When processing PostScript functions embedded in PDF files, the interpreter performs integer arithmetic to calculate buffer sizes. Due to incorrect overflow checking, an attacker can craft a PDF that triggers an integer overflow, causing the allocated buffer to be smaller than expected. Subsequent writes to this buffer then overflow into adjacent memory, corrupting data or executing arbitrary code.

Root Cause: The integer overflow check is flawed. For example, if the code calculates size = count * element_size and checks if (size > MAX), an attacker can make count and element_size such that the multiplication overflows to a small value, bypassing the check. The subsequent write loop then writes beyond the allocated buffer.

Attack Vector: A remote attacker sends a specially crafted PDF file to a target using Xpdf. The victim must open the file (user interaction required). No authentication is needed.

Vulnerable vs. Patched Code

Vulnerable Code (Xpdf 4.05 and earlier):

// Simplified vulnerable pattern
int count = get_int_from_pdf();
int element_size = get_int_from_pdf();
int size = count * element_size;  // Integer overflow possible
if (size > MAX_ALLOC) {
    error("Too large");
    return;
}
char *buffer = malloc(size);
for (int i = 0; i < count; i++) {
    buffer[i * element_size] = ...;  // OOB write if overflow occurred
}

Patched Code (hypothetical fix):

// Corrected pattern
int count = get_int_from_pdf();
int element_size = get_int_from_pdf();
if (count > 0 && element_size > MAX_SIZE / count) {
    error("Integer overflow");
    return;
}
int size = count * element_size;
if (size > MAX_ALLOC) {
    error("Too large");
    return;
}
char *buffer = malloc(size);
for (int i = 0; i < count; i++) {
    buffer[i * element_size] = ...;
}

The fix uses a division check before multiplication to prevent overflow.

Exploitation & Lab Setup

Red Team (Exploitation)

No public exploit code is available. However, a skilled attacker could craft a PDF with a PostScript function that triggers the integer overflow. The following is a conceptual approach:

  1. Craft a malicious PDF using a tool like pdf-parser.py or manual hex editing.
  2. Embed a PostScript function with carefully chosen count and element_size values to cause an integer overflow.
  3. Overwrite a function pointer or return address to redirect execution to shellcode.

Example (conceptual, not functional):

# Conceptual exploit generation
count = 0x10000001
element_size = 0x100
# count * element_size overflows to 0x100 (256 bytes)
# But the loop writes 0x10000001 times, causing massive OOB write

Lab Setup:

  • Target: Ubuntu 22.04 with Xpdf 4.05 installed.
  • Tooling: Python, pdf-parser.py, gdb, pwntools.
  • Steps:
    1. Install Xpdf 4.05.
    2. Generate a malicious PDF using a custom script.
    3. Open the PDF with xpdf malicious.pdf.
    4. Observe crash or code execution.

Blue Team (Defense)

  • Detection: Monitor for unusual PDF files with large or malformed PostScript functions. Use YARA rules to scan for suspicious patterns.
  • Prevention: Disable PostScript support in Xpdf if not needed. Use a sandboxed environment for PDF processing.
  • Mitigation: Apply vendor patch when available. In the interim, consider using alternative PDF libraries (e.g., Poppler, MuPDF).

Indicators of Compromise (IOCs)

  • File Hashes (SHA256): None available (no known samples).
  • Network Indicators: PDF files with unusual PostScript function parameters.
  • Behavioral: Xpdf process crash, memory corruption, unexpected code execution.
  • Registry/File System: Modified Xpdf configuration files (unlikely).

Detection Engineering

YARA Rule

rule CVE_2025_2574_Xpdf_OOB_Write {
    meta:
        description = "Detects PDF files exploiting CVE-2025-2574 in Xpdf"
        author = "Valters IT"
        date = "2025-03-20"
        reference = "CVE-2025-2574"
    strings:
        $postscript = "/Filter /PostScript" nocase
        $large_count = { 00 00 00 01 00 00 00 00 }  // Example: count > 2^24
        $overflow_pattern = { 0F 00 00 00 }  // Example: element_size * count overflow
    condition:
        $postscript and ($large_count or $overflow_pattern)
}

Sigma Rule

title: CVE-2025-2574 Xpdf PostScript Integer Overflow
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects PDF files with suspicious PostScript function parameters indicative of CVE-2025-2574
author: Valters IT
date: 2025-03-20
logsource:
    category: file_event
    product: windows
detection:
    selection:
        Image|endswith: '\xpdf.exe'
        TargetFilename|endswith: '.pdf'
    condition: selection
falsepositives:
    - Legitimate large PDF files
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-2574 Xpdf PostScript OOB Write Attempt"; flow:to_server; content:"/Filter /PostScript"; nocase; content:"|00 00 00 01 00 00 00 00|"; distance:0; within:8; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Disable PostScript support in Xpdf if not required. This can be done by recompiling without PostScript support or using a configuration flag.
  2. Short-term: Monitor for vendor patches. Consider switching to alternative PDF libraries (e.g., Poppler, MuPDF).
  3. Long-term: Implement input validation and integer overflow checks in all PDF processing code. Use static analysis tools to detect similar vulnerabilities.
  4. Detection: Deploy YARA and Sigma rules to detect malicious PDFs. Enable Suricata rules on network gateways.
  5. User Education: Warn users not to open PDFs from untrusted sources.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-2574/ · 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.