CVE-2025-59798: CWE-121 Stack-based Buffer Overflow in Artifex Ghostscript
Artifex Ghostscript through 10.05.1 has a stack-based buffer overflow in pdf_write_cmap in devices/vector/gdevpdtw.c.
AI Analysis
Technical Summary
CVE-2025-59798 is a stack-based buffer overflow vulnerability identified in Artifex Ghostscript, a widely used interpreter for PostScript and PDF files, affecting versions through 10.05.1. The vulnerability resides in the pdf_write_cmap function located in the devices/vector/gdevpdtw.c source file. A stack-based buffer overflow occurs when the function improperly handles input data, leading to potential memory corruption. This flaw can be triggered by an attacker with local access to the system, as the attack vector requires local privileges (AV:L) but no authentication or user interaction (PR:N/UI:N). The vulnerability impacts the integrity of the system by allowing an attacker to corrupt memory, which could lead to unpredictable behavior or code execution, although no direct confidentiality or availability impacts are indicated. The CVSS 3.1 base score is 4.3, categorized as medium severity, reflecting the limited attack surface due to the requirement for local access and the absence of known exploits in the wild. No patches or fixes have been published at the time of disclosure, emphasizing the need for vigilance. Ghostscript is commonly embedded in various document processing workflows, print servers, and PDF rendering services, making this vulnerability relevant to organizations relying on these services. The vulnerability's scope is limited to affected versions of Ghostscript, and exploitation does not require user interaction, increasing the risk if local access is compromised.
Potential Impact
For European organizations, the primary impact of CVE-2025-59798 lies in the potential for local attackers to corrupt memory on systems running vulnerable versions of Ghostscript, which could lead to integrity issues such as application crashes or arbitrary code execution in worst-case scenarios. This can disrupt document processing workflows, potentially affecting business continuity in sectors like finance, government, legal, and publishing where PDF handling is critical. Although the vulnerability does not directly impact confidentiality or availability, the integrity compromise could be leveraged as a foothold for further attacks if combined with other vulnerabilities. The requirement for local access limits remote exploitation but raises concerns for insider threats or compromised endpoints. Organizations with extensive use of Ghostscript in automated document processing or print services may face operational risks and should prioritize mitigation to avoid exploitation. The absence of known exploits reduces immediate risk but does not eliminate the threat, especially as attackers may develop exploits post-disclosure.
Mitigation Recommendations
1. Restrict local access to systems running vulnerable versions of Ghostscript by enforcing strict user permissions and access controls, limiting the potential for local exploitation. 2. Monitor and audit usage of Ghostscript binaries and related processes to detect anomalous behavior indicative of exploitation attempts. 3. Employ application whitelisting and endpoint protection solutions to prevent unauthorized execution of malicious code that could leverage this vulnerability. 4. Segregate document processing servers and print services from general user workstations to reduce attack surface. 5. Regularly check for and apply patches or updates from Artifex as soon as they become available to remediate the vulnerability. 6. Consider using alternative PDF processing tools or sandboxing Ghostscript processes to contain potential exploitation impact. 7. Educate system administrators and security teams about the vulnerability and the importance of controlling local access to critical document processing infrastructure.
Affected Countries
Germany, France, United Kingdom, Italy, Spain, Netherlands, Belgium, Sweden
CVE-2025-59798: CWE-121 Stack-based Buffer Overflow in Artifex Ghostscript
Description
Artifex Ghostscript through 10.05.1 has a stack-based buffer overflow in pdf_write_cmap in devices/vector/gdevpdtw.c.
AI-Powered Analysis
Technical Analysis
CVE-2025-59798 is a stack-based buffer overflow vulnerability identified in Artifex Ghostscript, a widely used interpreter for PostScript and PDF files, affecting versions through 10.05.1. The vulnerability resides in the pdf_write_cmap function located in the devices/vector/gdevpdtw.c source file. A stack-based buffer overflow occurs when the function improperly handles input data, leading to potential memory corruption. This flaw can be triggered by an attacker with local access to the system, as the attack vector requires local privileges (AV:L) but no authentication or user interaction (PR:N/UI:N). The vulnerability impacts the integrity of the system by allowing an attacker to corrupt memory, which could lead to unpredictable behavior or code execution, although no direct confidentiality or availability impacts are indicated. The CVSS 3.1 base score is 4.3, categorized as medium severity, reflecting the limited attack surface due to the requirement for local access and the absence of known exploits in the wild. No patches or fixes have been published at the time of disclosure, emphasizing the need for vigilance. Ghostscript is commonly embedded in various document processing workflows, print servers, and PDF rendering services, making this vulnerability relevant to organizations relying on these services. The vulnerability's scope is limited to affected versions of Ghostscript, and exploitation does not require user interaction, increasing the risk if local access is compromised.
Potential Impact
For European organizations, the primary impact of CVE-2025-59798 lies in the potential for local attackers to corrupt memory on systems running vulnerable versions of Ghostscript, which could lead to integrity issues such as application crashes or arbitrary code execution in worst-case scenarios. This can disrupt document processing workflows, potentially affecting business continuity in sectors like finance, government, legal, and publishing where PDF handling is critical. Although the vulnerability does not directly impact confidentiality or availability, the integrity compromise could be leveraged as a foothold for further attacks if combined with other vulnerabilities. The requirement for local access limits remote exploitation but raises concerns for insider threats or compromised endpoints. Organizations with extensive use of Ghostscript in automated document processing or print services may face operational risks and should prioritize mitigation to avoid exploitation. The absence of known exploits reduces immediate risk but does not eliminate the threat, especially as attackers may develop exploits post-disclosure.
Mitigation Recommendations
1. Restrict local access to systems running vulnerable versions of Ghostscript by enforcing strict user permissions and access controls, limiting the potential for local exploitation. 2. Monitor and audit usage of Ghostscript binaries and related processes to detect anomalous behavior indicative of exploitation attempts. 3. Employ application whitelisting and endpoint protection solutions to prevent unauthorized execution of malicious code that could leverage this vulnerability. 4. Segregate document processing servers and print services from general user workstations to reduce attack surface. 5. Regularly check for and apply patches or updates from Artifex as soon as they become available to remediate the vulnerability. 6. Consider using alternative PDF processing tools or sandboxing Ghostscript processes to contain potential exploitation impact. 7. Educate system administrators and security teams about the vulnerability and the importance of controlling local access to critical document processing infrastructure.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
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: 68d0c68eb68a0c387d456704
Added to database: 9/22/2025, 3:46:22 AM
Last enriched: 11/3/2025, 6:16:06 PM
Last updated: 11/3/2025, 9:53:01 PM
Views: 74
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-11193: CWE-256: Plaintext Storage of a Password in Lenovo Tab M11 TB330FU TB330XU
MediumCVE-2024-49761: CWE-1333: Inefficient Regular Expression Complexity in ruby rexml
MediumCVE-2024-48910: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in cure53 DOMPurify
CriticalCVE-2024-45802: CWE-20: Improper Input Validation in squid-cache squid
HighCVE-2024-45239: n/a
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.