CVE-2025-27831
Published: 25 March 2025
Summary
CVE-2025-27831 is a critical-severity Classic Buffer Overflow (CWE-120) vulnerability in Artifex Ghostscript. Its CVSS base score is 9.8 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 38.1th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified are NIST 800-53 SI-10 (Information Input Validation) and SI-16 (Memory Protection).
Deeper analysis
CVE-2025-27831 is a text buffer overflow vulnerability (CWE-120) discovered in Artifex Ghostscript versions before 10.05.0. The flaw affects the DOCXWRITE and TXTWRITE devices, specifically in the file devices/vector/doc_common.c, where long characters trigger the overflow.
The vulnerability carries a CVSS v3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), indicating it is exploitable remotely with low complexity, no privileges, and no user interaction required. Attackers can leverage this to gain high-impact access, potentially achieving arbitrary code execution, data compromise, or system disruption on affected systems processing malicious inputs.
Advisories recommend upgrading to Ghostscript 10.05.0 or later to mitigate the issue. Key references include the Ghostscript bug tracker entry at https://bugs.ghostscript.com/show_bug.cgi?id=708132 and the Debian LTS announcement at https://lists.debian.org/debian-lts-announce/2025/04/msg00014.html.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2025-8087
Vulnerability details
An issue was discovered in Artifex Ghostscript before 10.05.0. The DOCXWRITE TXTWRITE device has a text buffer overflow via long characters to devices/vector/doc_common.c.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
Remote buffer overflow (CWE-120) in Ghostscript with CVSS 9.8 (AV:N/PR:N/UI:N) enables arbitrary code execution on systems processing malicious DOCX/TXT inputs, directly mapping to exploitation of public-facing applications using the library for document handling.
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST 800-53 r5) AI
Requires timely identification, reporting, and patching of the buffer overflow flaw in Ghostscript, directly aligning with the advisory to upgrade to version 10.05.0.
Implements memory protections such as non-executable memory and address space randomization to prevent arbitrary code execution from the text buffer overflow.
Enforces validation of information inputs to Ghostscript devices, preventing overflows triggered by excessively long character strings.