CVE-2025-27834

7.8 HIGH

📋 TL;DR

A buffer overflow vulnerability in Artifex Ghostscript allows remote attackers to execute arbitrary code by crafting a malicious PDF document with an oversized Type 4 function. This affects systems processing PDF files with vulnerable Ghostscript versions, potentially compromising servers, workstations, or applications using Ghostscript for PDF rendering.

💻 Affected Systems

Products:
  • Artifex Ghostscript
Versions: All versions before 10.05.0
Operating Systems: All platforms where Ghostscript is installed (Linux, Windows, macOS, etc.)
Default Config Vulnerable: ⚠️ Yes
Notes: Any application or service using Ghostscript for PDF processing is vulnerable, including web apps, document converters, and print servers.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to full system compromise, data theft, or ransomware deployment.

🟠

Likely Case

Application crash (denial of service) or limited code execution in sandboxed environments.

🟢

If Mitigated

Denial of service only if exploit fails or is blocked by security controls.

🌐 Internet-Facing: HIGH - PDF processing services exposed to the internet are directly vulnerable to malicious uploads.
🏢 Internal Only: MEDIUM - Internal users could exploit via malicious PDFs, but requires user interaction or internal processing.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires crafting a malicious PDF document; no public exploit code is known at this time.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 10.05.0 and later

Vendor Advisory: https://bugs.ghostscript.com/show_bug.cgi?id=708253

Restart Required: No

Instructions:

1. Download Ghostscript 10.05.0 or later from the official website. 2. Stop any services using Ghostscript. 3. Install the updated version. 4. Restart services.

🔧 Temporary Workarounds

Disable PDF processing

all

Temporarily disable Ghostscript-based PDF processing in applications until patched.

Use PDF sanitization

all

Implement PDF sanitization tools (e.g., qpdf, mutool) to strip malicious content before processing.

🧯 If You Can't Patch

  • Isolate Ghostscript services in network segments with strict access controls.
  • Implement application allowlisting to block unexpected process execution from Ghostscript.

🔍 How to Verify

Check if Vulnerable:

Run 'gs --version' and check if version is below 10.05.0.

Check Version:

gs --version

Verify Fix Applied:

Confirm 'gs --version' returns 10.05.0 or higher.

📡 Detection & Monitoring

Log Indicators:

  • Ghostscript crash logs, unexpected process spawns from gs, or PDF processing errors.

Network Indicators:

  • Unusual PDF uploads to web services, spikes in PDF processing requests.

SIEM Query:

source="ghostscript.log" AND (event="segmentation fault" OR event="buffer overflow")

🔗 References

📤 Share & Export