CVE-2023-52722
Medium · 5.5CVSS
5.5
EPSS
0.3%
Published
Apr 28, 2024
CISA due date
—
Cloudanix analysis
A document processing tool can be tricked into ignoring its own safety settings, letting attackers alter files when someone opens a specially crafted document.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Library
- Class
- Authorization Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Bypasses SAFER mode restrictions in the PostScript interpreter by permitting non-standard eexec seeds in Type 1 font handling within psi/zmisc1.c, enabling unauthorized operations on the host system.
Why it matters to the business
Systems that process untrusted PostScript or PDF documents with Ghostscript risk unauthorized file modifications or integrity violations, increasing exposure for document-handling workflows and downstream applications.
How an attack unfolds
An attacker creates a PostScript file containing a non-standard eexec seed, then convinces a user to open the file with Ghostscript running in SAFER mode, allowing the interpreter to execute operations that would otherwise be blocked.
How to fix it
Upgrade Ghostscript to version 10.03.1 or later; for the GIT package apply commit 865d8905b3fdb3a0fabe3628a67bad634cf88ba9.
How to confirm the fix worked
Verify the installed Ghostscript version is 10.03.1 or newer; test processing of sample documents that use non-standard eexec seeds to confirm the bypass is blocked.
Typical attack path
- Craft a PostScript document embedding a non-standard eexec seed
- Deliver the document through email, web download, or shared storage
- Victim opens the file using Ghostscript with SAFER enabled
- Interpreter accepts the seed and bypasses intended restrictions
- Perform unauthorized file or system operations
How to detect it
Review process execution logs for Ghostscript invocations on external documents and monitor for unexpected file writes or permission changes following document rendering.
What your security team should do
- Prioritize upgrade of all Ghostscript installations to the fixed version
- Restrict Ghostscript execution on untrusted document sources until patched
- Inventory dependent applications and rebuild any static builds
The record
An issue was discovered in Artifex Ghostscript before 10.03.1. psi/zmisc1.c, when SAFER mode is used, allows eexec seeds other than the Type 1 standard.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.18 | ghostscript | 0 | 10.04.0-r0 |
| Alpine:v3.19 | ghostscript | 0 | 10.03.1-r0 |
| Alpine:v3.20 | ghostscript | 0 | 10.03.1-r0 |
| Alpine:v3.21 | ghostscript | 0 | 10.03.1-r0 |
| Alpine:v3.22 | ghostscript | 0 | 10.03.1-r0 |
| Chainguard | ghostscript | 0 | 10.03.1-r0 |
| Chainguard | ghostscript-dbg | 0 | 10.03.1-r0 |
| Chainguard | ghostscript-dev | 0 | 10.03.1-r0 |
| Chainguard | ghostscript-doc | 0 | 10.03.1-r0 |
| Debian:11 | ghostscript | 0 | 9.53.3~dfsg-7+deb11u7 |
| Debian:12 | ghostscript | 0 | 10.0.0~dfsg-11+deb12u4 |
| Debian:13 | ghostscript | 0 | 10.02.0~dfsg-1 |
| Mageia:9 | ghostscript | 0 | 10.00.0-6.5.mga9 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP5 | ghostscript | 0 | 9.52-150000.188.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | ghostscript | 0 | 9.52-150000.188.1 |
| SUSE:Linux Enterprise Server 12 SP5 | ghostscript | 0 | 9.52-23.74.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | ghostscript | 0 | 9.52-23.74.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | ghostscript | 0 | 9.52-23.74.1 |
| Ubuntu:20.04:LTS | ghostscript | 0 | 9.50~dfsg-5ubuntu4.12 |
| Ubuntu:22.04:LTS | ghostscript | 0 | 9.55.0~dfsg1-0ubuntu5.7 |
| Ubuntu:23.10 | ghostscript | 0 | 10.01.2~dfsg1-0ubuntu2.3 |
| Ubuntu:24.04:LTS | ghostscript | 0 | 10.02.1~dfsg1-0ubuntu7 |
| Ubuntu:24.04:LTS | ghostscript | 0 | 10.02.1~dfsg1-0ubuntu7.1 |
| Ubuntu:24.10 | ghostscript | 0 | 10.02.1~dfsg1-0ubuntu7 |
| Ubuntu:Pro:16.04:LTS | ghostscript | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | ghostscript | 0 | No fix |
| Wolfi | ghostscript | 0 | 10.03.1-r0 |
| Wolfi | ghostscript-dbg | 0 | 10.03.1-r0 |
| Wolfi | ghostscript-dev | 0 | 10.03.1-r0 |
| Wolfi | ghostscript-doc | 0 | 10.03.1-r0 |
| openSUSE:Leap 15.5 | ghostscript | 0 | 9.52-150000.188.1 |
| openSUSE:Leap 15.6 | ghostscript | 0 | 9.52-150000.188.1 |
| openSUSE:Tumbleweed | ghostscript | 0 | 10.03.1-1.1 |
Related vulnerabilities
- CVE-2025-27837 An issue was discovered in Artifex Ghostscript before 10.05.0. Also affects ghostscript
- CVE-2024-46956 An issue was discovered in psi/zfile.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2024-46955 An issue was discovered in psi/zcolor.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2024-46953 An issue was discovered in base/gsdevice.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2024-46954 An issue was discovered in decode_utf8 in base/gp_utf8.c in Artifex Ghostscript before… Also affects ghostscript
- CVE-2024-46952 An issue was discovered in pdf/pdf_xref.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2024-46951 An issue was discovered in psi/zcolor.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2017-8291 Artifex Ghostscript through 2017-04-26 allows -dSAFER bypass and remote command execution… Also affects ghostscript