# CVE-2023-36664: Artifex Ghostscript before 10.01.2 mishandles permission validation for pipe devices (with the %pipe% prefix or the | pipe character prefix).


- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 25 Jun 2023
- **Updated:** 28 Aug 2026
- **Also known as:** ALPINE-CVE-2023-36664, ALSA-2023:5459, DEBIAN-CVE-2023-36664, DSA-5446-1, GHSA-9gf6-5j7x-x3m9, RHSA-2023:4324, RHSA-2023:5459, RLSA-2023:5459, SUSE-SU-2023:2829-1, SUSE-SU-2023:2844-1, UBUNTU-CVE-2023-36664, USN-6213-1, openSUSE-SU-2024:13036-1

## What is CVE-2023-36664?

CVE-2023-36664 is a high-severity vulnerability in Artifex Ghostscript, published on 25 Jun 2023. 

### Official description

Artifex Ghostscript before 10.01.2 mishandles permission validation for pipe devices (with the %pipe% prefix or the | pipe character prefix).

Weakness: CWE-552 (Files or Directories Accessible to External Parties)

## Which versions are affected by CVE-2023-36664?

It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ghostscript` | AlmaLinux:9 | All versions | 9.54.0-10.el9_2 |
| `ghostscript-doc` | AlmaLinux:9 | All versions | 9.54.0-10.el9_2 |
| `ghostscript-tools-dvipdf` | AlmaLinux:9 | All versions | 9.54.0-10.el9_2 |
| `ghostscript-tools-fonts` | AlmaLinux:9 | All versions | 9.54.0-10.el9_2 |
| `ghostscript-tools-printing` | AlmaLinux:9 | All versions | 9.54.0-10.el9_2 |
| `ghostscript-x11` | AlmaLinux:9 | All versions | 9.54.0-10.el9_2 |
| `libgs` | AlmaLinux:9 | All versions | 9.54.0-10.el9_2 |
| `libgs-devel` | AlmaLinux:9 | All versions | 9.54.0-10.el9_2 |
| `ghostscript` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-doc` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-gtk-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-tools-dvipdf` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-tools-fonts` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-tools-printing` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-x11` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-x11-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `libgs` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `libgs-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript` | Red Hat:enterprise_linux:9::crb | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-debugsource` | Red Hat:enterprise_linux:9::crb | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-gtk-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-tools-fonts` | Red Hat:enterprise_linux:9::crb | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-tools-printing` | Red Hat:enterprise_linux:9::crb | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript-x11-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 0:9.54.0-10.el9_2 |
| `libgs-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 0:9.54.0-10.el9_2 |
| `libgs-devel` | Red Hat:enterprise_linux:9::crb | All versions | 0:9.54.0-10.el9_2 |
| `ghostscript` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |
| `ghostscript-debuginfo` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |
| `ghostscript-debugsource` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |
| `ghostscript-doc` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |
| `ghostscript-gtk-debuginfo` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |
| `ghostscript-tools-dvipdf` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |
| `ghostscript-tools-fonts` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |
| `ghostscript-tools-printing` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |
| `ghostscript-x11` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |
| `ghostscript-x11-debuginfo` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |
| `libgs` | Red Hat:rhel_eus:9.0::appstream | All versions | 0:9.54.0-7.el9_0.1 |

Products: Artifex Ghostscript, Debian Debian Linux, Fedoraproject Fedora.

## How do I fix CVE-2023-36664?

Upgrade to a fixed version.

## Is CVE-2023-36664 being exploited?

There is no known exploitation of CVE-2023-36664 in the wild and no public exploit code.

Public exploit code:

- Ghostscript command injection vulnerability PoC (CVE-2023-36664) (github_poc): https://github.com/jakabakos/CVE-2023-36664-Ghostscript-command-injection
- Scan for GhostScript files affected to CVE-2023-36664 (github_poc): https://github.com/winkler-winsen/Scan_GhostScript
- Proof of concept developed for the CVE-2023-36664 (github_poc): https://github.com/jeanchpt/CVE-2023-36664
- https://github.com/churamanib/CVE-2023-36664-Ghostscript-command-injection (github_poc): https://github.com/churamanib/CVE-2023-36664-Ghostscript-command-injection

## Other vulnerabilities in Artifex Ghostscript

- [CVE-2017-8291](https://insights.sbomify.com/CVE-2017-8291/): Artifex Ghostscript Type Confusion (high 7.8, exploited in the wild)
- [CVE-2021-3781](https://insights.sbomify.com/CVE-2021-3781/): Command injection in ghostscript (critical 9.9)
- [CVE-2025-27831](https://insights.sbomify.com/CVE-2025-27831/): Memory corruption in n/a (critical 9.8)
- [CVE-2025-27832](https://insights.sbomify.com/CVE-2025-27832/): Memory corruption in n/a (critical 9.8)
- [CVE-2025-27836](https://insights.sbomify.com/CVE-2025-27836/): Memory corruption in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-36664 and fix it if it is affected.

What it is: CVE-2023-36664 is a high-severity vulnerability in Artifex Ghostscript, published on 25 Jun 2023. 
Exploitation: There is no known exploitation of CVE-2023-36664 in the wild and no public exploit code.

Affected product: Artifex Ghostscript. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-36664/ (Markdown: https://insights.sbomify.com/CVE-2023-36664/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-36664
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-36664
- OSV: https://osv.dev/vulnerability/CVE-2023-36664

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-36664/
Summaries are generated and may contain mistakes; the official description above is the record.
