Skip to main content

CVE-2025-59800: CWE-190 Integer Overflow or Wraparound in Artifex Ghostscript

Medium
VulnerabilityCVE-2025-59800cvecve-2025-59800cwe-190
Published: Mon Sep 22 2025 (09/22/2025, 00:00:00 UTC)
Source: CVE Database V5
Vendor/Project: Artifex
Product: Ghostscript

Description

In Artifex Ghostscript through 10.05.1, ocr_begin_page in devices/gdevpdfocr.c has an integer overflow that leads to a heap-based buffer overflow in ocr_line8.

AI-Powered Analysis

AILast updated: 09/22/2025, 03:31:53 UTC

Technical Analysis

CVE-2025-59800 is a medium severity vulnerability identified in Artifex Ghostscript, specifically affecting versions through 10.05.1. The issue arises in the function ocr_begin_page located in devices/gdevpdfocr.c, where an integer overflow (CWE-190) occurs. This overflow leads to a heap-based buffer overflow in the subsequent function ocr_line8. The integer overflow likely causes miscalculation of buffer sizes or memory allocations, which then results in writing beyond the allocated heap buffer boundaries. Such heap-based buffer overflows can corrupt memory, potentially leading to arbitrary code execution, application crashes, or denial of service. The CVSS 3.1 score is 4.3, indicating a medium severity level, with the vector AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N. This means the attack requires local access (AV:L), low attack complexity (AC:L), no privileges (PR:N), no user interaction (UI:N), and the scope is changed (S:C). The impact affects integrity (I:L) but not confidentiality or availability. No known exploits are reported in the wild yet, and no patches are currently linked. The vulnerability is technical in nature, involving memory management flaws in the OCR processing component of Ghostscript, a widely used interpreter for PostScript and PDF files. Given the local attack vector, exploitation would require an attacker to have local access to the system or the ability to run code locally, possibly through a crafted PDF or PostScript file that triggers the vulnerable OCR processing code path.

Potential Impact

For European organizations, the impact of CVE-2025-59800 depends largely on the deployment of Ghostscript in their environments. Ghostscript is commonly used in document processing, printing services, and PDF manipulation workflows. Organizations relying on Ghostscript for automated document handling, especially those processing OCR-enabled PDFs, could be at risk if attackers gain local access or can trick users into processing malicious files locally. The heap-based buffer overflow could allow attackers to alter the integrity of the system by executing arbitrary code or causing application crashes, potentially disrupting business operations or enabling further lateral movement. Although the attack requires local access, insider threats or compromised endpoints could exploit this vulnerability to escalate privileges or persist within networks. The lack of confidentiality and availability impact reduces the risk of data leakage or denial of service, but the integrity impact remains significant for critical document workflows. European sectors with high document processing needs, such as legal, finance, and government, may face operational risks if this vulnerability is exploited.

Mitigation Recommendations

1. Immediate mitigation involves restricting local access to systems running vulnerable versions of Ghostscript, especially those processing OCR-enabled PDFs. 2. Implement strict file validation and sandboxing for document processing workflows to prevent untrusted or malicious files from triggering the vulnerable code path. 3. Monitor and audit local user activities on systems with Ghostscript to detect suspicious attempts to process crafted documents. 4. Employ application whitelisting and endpoint protection solutions to limit execution of unauthorized code that could exploit this vulnerability. 5. Since no official patch is currently linked, organizations should track Artifex's advisories closely and apply patches promptly once available. 6. Consider isolating document processing services in hardened virtual machines or containers to limit the impact of potential exploitation. 7. Educate users about the risks of opening untrusted PDF or PostScript files locally, especially those with OCR content.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2025-09-22T00:00:00.000Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 68d0bf8cb68a0c387d44cdf7

Added to database: 9/22/2025, 3:16:28 AM

Last enriched: 9/22/2025, 3:31:53 AM

Last updated: 9/26/2025, 2:22:28 AM

Views: 22

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats