CVE-2023-4042 in Artifex Ghostscript and 8 more products
A flaw was found in ghostscript. The fix for CVE-2020-16305 in ghostscript was not included in RHSA-2021:1852-06 advisory as it was claimed to be. This issue only affects the ghostscript package as shipped with Red Hat Enterprise Linux 8.
Affects 9 products from 2 vendors. Facts below cite their sources.
Requires local access, low complexity, no authentication required, requires user interaction, impact contained to the vulnerable component, no confidentiality impact, no integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Artifex | Ghostscript | < 9.51 |
| Redhat | Enterprise Linux For Ibm Z Systems | 8.0_s390x |
| Redhat | Enterprise Linux For Power Little Endian | 8.0_ppc64le |
| Redhat | Enterprise Linux For Arm 64 | 8.0_aarch64 |
| Redhat | Enterprise Linux | 8.0 |
| Redhat | Codeready Linux Builder For Ibm Z Systems | 8.0_s390x |
| Redhat | Codeready Linux Builder For Power Little Endian | 8.0_ppc64le |
| Redhat | Codeready Linux Builder For Arm64 | 8.0_aarch64 |
| Redhat | Codeready Linux Builder | 8.0 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
A flaw was found in ghostscript. The fix for CVE-2020-16305 in ghostscript was not included in RHSA-2021:1852-06 advisory as it was claimed to be. This issue only affects the ghostscript package as shipped with Red Hat Enterprise Linux 8.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2023-4042 |
|---|---|
| BreachSpider ID | BS-2023-GLOBAL-056408-M |
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| Published | 2023-08-23 |
| Last modified | 2026-11-26 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-125: Out-of-Bounds Read
Software reads data past the boundary of an allocated buffer, leaking sensitive information or causing crashes.
CWE-787: Out-of-Bounds Write
Software writes data past buffer boundaries, corrupting memory and potentially enabling code execution.
Related attack patterns (CAPEC)
CAPEC-540 Overread Buffers via CWE-125
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
A flaw in the ghostscript package, affecting Red Hat Enterprise Linux 8, was not properly addressed in a previous security advisory. This issue could allow an attacker to execute arbitrary code with the privileges of the user running ghostscript.
An attacker could exploit this vulnerability by convincing a user to process a specially crafted PostScript or PDF file with ghostscript. The vulnerability arises from improper handling of certain file formats, leading to a buffer overflow condition.
Questions
What is CVE-2023-4042?
A flaw in the ghostscript package, affecting Red Hat Enterprise Linux 8, was not properly addressed in a previous security advisory. This issue could allow an attacker to execute arbitrary code with the privileges of the user running ghostscript.
What is the CVSS score for CVE-2023-4042?
CVE-2023-4042 has CVSS 5.5 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H. EPSS: 0.4%.
Is CVE-2023-4042 actively exploited?
No confirmed active exploitation of CVE-2023-4042 as of 2026-11-27.
How do I remediate CVE-2023-4042?
Priority: MEDIUM. Advisory: https://access.redhat.com/errata/RHSA-2023:7053
What systems are affected by CVE-2023-4042?
CVE-2023-4042 affects Artifex Ghostscript; Redhat Enterprise Linux For Ibm Z Systems, Enterprise Linux For Power Little Endian, Enterprise Linux For Arm 64, Enterprise Linux, Codeready Linux Builder For Ibm Z Systems, Codeready Linux Builder For Power Little Endian, Codeready Linux Builder For Arm64, Codeready Linux Builder.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Artifex","product":"Ghostscript","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-11-26.