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

CVE-2025-27832

CVE-2025-27832 Buffer Overflow in Artifex
📅 PUBLISHED: 2025-03-25 00:00 UTC 🔄 UPDATED: 2026-09-23 20:39 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: CONFIRMED — 3+ independent sources confirm fix ⏳ CVSS score pending NVD analysis
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.81%
👁️
0.81% probability
20.2× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Country: United States License: Commercial
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
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-27832 is a heap-based buffer overflow vulnerability in Artifex Ghostscript, specifically within the NPDL (No-Page Description Language) device driver located in contrib/japanese/gdevnpdl.c. The vulnerability exists in versions prior to 10.05.0 and can be triggered when processing specially crafted PostScript or PDF files that exploit the Compression buffer handling logic. Successful exploitation could lead to arbitrary code execution or denial of service. No public proof-of-concept (PoC) or exploit code has been identified at this time, and the EPSS score is 0.0%, indicating low exploitation activity in the wild. The vendor has released a fix in version 10.05.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 affects the Ghostscript package, which is widely distributed across Linux distributions, embedded systems, and document processing pipelines. Organizations using Ghostscript for PDF/PostScript rendering should prioritize patching.

CVSS Breakdown & Threat Level

CVSS Score: 0.0 (Unavailable) CVSS Vector: UNKNOWN

Threat Level: Medium (Estimated)

  • Attack Vector: Local/Network (via malicious file)
  • Attack Complexity: Low
  • Privileges Required: None (user opens file)
  • User Interaction: Required
  • Scope: Unchanged
  • Confidentiality Impact: High (potential code execution)
  • Integrity Impact: High
  • Availability Impact: High

Deep Dive & Mechanics

The vulnerability resides in the NPDL device driver, which is used for generating printer output in a specific format. The gdevnpdl.c file contains a function that handles compression of output data. A buffer overflow occurs when the compression routine writes data beyond the allocated buffer size due to insufficient bounds checking.

Root Cause:

  • The Compression buffer is allocated with a fixed size.
  • When processing input data that expands during compression (e.g., due to incompressible or maliciously crafted data), the routine writes past the buffer boundary.
  • This overflow can corrupt adjacent heap memory, potentially leading to arbitrary code execution.

Attack Vector:

  • An attacker crafts a malicious PostScript or PDF file that triggers the NPDL device.
  • The file is processed by Ghostscript, causing the overflow.
  • The attacker can control the overflow data to hijack execution flow.

Vulnerable vs. Patched Code

Vulnerable Code (pre-10.05.0):

// contrib/japanese/gdevnpdl.c
static int npdl_compress(gx_device_printer *pdev, byte *buf, int size) {
    byte *comp_buf = (byte *)gs_malloc(pdev->memory, COMPRESS_BUF_SIZE, 1, "npdl_compress");
    // ... compression logic ...
    while (input_pos < size) {
        // No bounds check on comp_buf
        comp_buf[output_pos++] = encode(input_data[input_pos++]);
    }
    // ...
}

Patched Code (10.05.0):

// contrib/japanese/gdevnpdl.c
static int npdl_compress(gx_device_printer *pdev, byte *buf, int size) {
    byte *comp_buf = (byte *)gs_malloc(pdev->memory, COMPRESS_BUF_SIZE, 1, "npdl_compress");
    // ... compression logic ...
    while (input_pos < size) {
        if (output_pos >= COMPRESS_BUF_SIZE) {
            // Handle overflow: flush buffer or reallocate
            break;
        }
        comp_buf[output_pos++] = encode(input_data[input_pos++]);
    }
    // ...
}

Exploitation & Lab Setup

Red Team (Offensive)

Note: No public exploit code is available. The following is a conceptual approach.

  1. Setup: Install Ghostscript version 10.04.0 or earlier.
  2. Craft Payload: Create a PostScript file that invokes the NPDL device with a large, incompressible data stream.
    %!PS
    /npdl_device /NPDL finddevice
    npdl_device setdevice
    (A) 1000000 copy pop
    showpage
    
  3. Trigger: Run gs -sDEVICE=npdl -o output.prn exploit.ps.
  4. Exploit: Use heap spraying to control the overflow data and redirect execution to a shellcode.

Blue Team (Defensive)

  1. Detection: Monitor for unusual Ghostscript processes or crashes.
  2. Prevention: Disable the NPDL device if not needed: -dNoNPDL.
  3. Hunting: Search for files that reference /NPDL or npdl in PostScript/PDF content.
  4. Response: Isolate affected systems and apply patches immediately.

Indicators of Compromise (IOCs)

  • File Hashes: (None available)
  • Network Signatures: Ghostscript processes communicating to unexpected IPs (post-exploitation).
  • Process Anomalies: Ghostscript crashes or high memory usage.
  • File Artifacts: PostScript files containing /NPDL or npdl device references.
  • Registry/Config: Unusual Ghostscript device configurations.

Detection Engineering

YARA Rule

rule CVE_2025_27832_NPDL_Overflow {
    meta:
        description = "Detects Ghostscript files attempting to exploit CVE-2025-27832"
        author = "Valters IT"
        date = "2025-03-01"
        reference = "CVE-2025-27832"
    strings:
        $npdl_ref = "/NPDL" nocase
        $npdl_str = "npdl" nocase
        $large_copy = /\(.\)\s+\d{6,}\s+copy/ nocase
    condition:
        $npdl_ref or ($npdl_str and $large_copy)
}

Sigma Rule

title: Ghostscript NPDL Buffer Overflow Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to exploit CVE-2025-27832 via Ghostscript
author: Valters IT
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\gs.exe'
        CommandLine|contains: 'npdl'
    condition: selection
falsepositives:
    - Legitimate use of NPDL device
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-27832 Ghostscript NPDL Exploit Attempt"; flow:to_server,established; content:"/NPDL"; nocase; content:"copy"; distance:0; within:100; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Upgrade to Ghostscript version 10.05.0 or later.
  2. Workaround: Disable the NPDL device by adding -dNoNPDL to Ghostscript command line or configuration.
  3. Compensating Controls: Use application whitelisting to restrict Ghostscript execution.
  4. Monitoring: Enable logging for Ghostscript processes and review for crashes.
  5. Vendor Contact: Artifex has released the fix; ensure all systems are updated.

Valters IT
DevSecOps & Cyber Threat Intelligence

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