CVE-2024-29507

5.4 MEDIUM

📋 TL;DR

This CVE describes a stack-based buffer overflow vulnerability in Artifex Ghostscript when processing CIDFSubstPath and CIDFSubstFont parameters. Attackers could potentially execute arbitrary code or cause denial of service by exploiting this overflow. Systems using Ghostscript for PDF/PostScript processing are affected.

💻 Affected Systems

Products:
  • Artifex Ghostscript
Versions: All versions before 10.03.0
Operating Systems: All platforms running Ghostscript
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability triggers when processing documents with malicious CIDFSubstPath/CIDFSubstFont parameters.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

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

🟠

Likely Case

Denial of service causing Ghostscript crashes and disruption of document processing services.

🟢

If Mitigated

Limited impact with proper sandboxing and privilege separation, potentially just crashes.

🌐 Internet-Facing: MEDIUM - Requires processing malicious documents, but many internet-facing systems accept document uploads.
🏢 Internal Only: MEDIUM - Internal users could exploit via malicious documents, but requires user interaction or automated processing.

🎯 Exploit Status

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

Exploitation requires crafting malicious documents that trigger the buffer overflow via specific parameters.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 10.03.0

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

Restart Required: Yes

Instructions:

1. Download Ghostscript 10.03.0 or later from official sources. 2. Stop all Ghostscript services. 3. Install the updated version. 4. Restart services. 5. Verify the update.

🔧 Temporary Workarounds

Disable Ghostscript in document processing pipelines

all

Temporarily remove Ghostscript from document conversion/processing workflows

Sandbox Ghostscript execution

linux

Run Ghostscript in isolated containers or with minimal privileges

docker run --read-only --cap-drop=ALL ghostscript

🧯 If You Can't Patch

  • Implement strict input validation for documents processed by Ghostscript
  • Deploy network segmentation to isolate Ghostscript servers from critical systems

🔍 How to Verify

Check if Vulnerable:

Run 'gs --version' and check if version is below 10.03.0

Check Version:

gs --version

Verify Fix Applied:

Confirm 'gs --version' returns 10.03.0 or higher

📡 Detection & Monitoring

Log Indicators:

  • Ghostscript crash logs
  • Unexpected process termination
  • Memory access violation errors

Network Indicators:

  • Unusual document upload patterns to Ghostscript services

SIEM Query:

process_name:"gs" AND (event_type:"crash" OR exit_code:139)

🔗 References

📤 Share & Export