OS Command Injection in Ghostscript - CVE-2023-36664

 

OS Command Injection in Ghostscript - CVE-2023-36664

Published: July 4, 2023 / Updated: June 7, 2024


Vulnerability identifier: #VU77939
CSH Severity: High
CVSS v4: 8.6 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2023-36664
CWE-ID: CWE-78
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.

The vulnerability exists due to improper input validation for pipe devices (with the %pipe% prefix or the | pipe character prefix). A remote attacker can trick the victim to open a specially crafted PDF file and execute arbitrary OS commands on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

Ghostscript
Debian Linux
Amazon Linux AMI
Oracle Linux
Gentoo Linux
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise High Performance Computing 12
SUSE Linux Enterprise Real Time 15
SUSE Linux Enterprise High Performance Computing ESPOS 15
SUSE Linux Enterprise High Performance Computing LTSS 15
SUSE Linux Enterprise Desktop 15
SUSE Linux Enterprise Server for SAP Applications 12
SUSE Linux Enterprise Software Development Kit 12
SUSE CaaS Platform
SUSE Manager Proxy
SUSE Manager Retail Branch Server
SUSE Manager Server
SUSE Enterprise Storage
Anolis OS
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for x86_64 - Extended Update Support
SUSE OpenStack Cloud Crowbar
SUSE OpenStack Cloud
SUSE Linux Enterprise Server 12 SP2 BCL
SUSE Linux Enterprise Server 12 SP4 LTSS
SUSE Linux Enterprise Server 12 SP4 ESPOS
Slackware Linux
SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS
SUSE Linux Enterprise Server 15 SP1 LTSS
SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS
SUSE Linux Enterprise Server 15 SP2 LTSS
SUSE Linux Enterprise Server 15 SP3 LTSS
Basesystem Module
openSUSE Leap
openEuler
Ubuntu
Fedora
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
ghostscript (Debian package)
ghostscript-help
ghostscript-debuginfo
ghostscript-devel
ghostscript-debugsource
ghostscript-tools-dvipdf
ghostscript
ghostscript-x11-debuginfo
ghostscript-x11
ghostscript (Red Hat package)
libgs-devel
libgs
ghostscript-tools-printing
ghostscript-tools-fonts
ghostscript-doc
ghostscript-gtk
app-text/ghostscript-gpl
ghostscript (Ubuntu package)
EMC Cloud Tiering Appliance

How to mitigate CVE-2023-36664

Install updates from vendor's website.

Ghostscript - update to 10.01.2
ghostscript (Debian package) - addressed in versions 9.53.3~dfsg-7+deb11u5, 10.0.0~dfsg-11+deb12u1
ghostscript-help - addressed in versions 9.52-9, 9.52-10, 9.55.0-5
ghostscript-debuginfo - addressed in versions 9.52-9, 9.52-10, 9.55.0-5
ghostscript-devel - addressed in versions 9.52-9, 9.52-10, 9.55.0-5
ghostscript-debugsource - addressed in versions 9.52-9, 9.52-10, 9.55.0-5
ghostscript-tools-dvipdf - addressed in versions 9.52-9, 9.52-10, 9.55.0-5
ghostscript - addressed in versions 9.52-9, 9.52-10, 9.55.0-5
ghostscript-x11-debuginfo - addressed in versions 9.52-23.54.1, 9.52-150000.167.1
ghostscript-debuginfo - addressed in versions 9.52-23.54.1, 9.52-150000.167.1
ghostscript-x11 - addressed in versions 9.52-23.54.1, 9.52-150000.167.1
ghostscript-debugsource - addressed in versions 9.52-23.54.1, 9.52-150000.167.1
ghostscript - addressed in versions 9.52-23.54.1, 9.52-150000.167.1
ghostscript-devel - addressed in versions 9.52-23.54.1, 9.52-150000.167.1
ghostscript (Red Hat package) - addressed in versions 9.54.0-7.el9_0.1, 9.54.0-10.el9_2
libgs-devel - addressed in versions 9.54.0-10, 10.01.2-1
libgs - addressed in versions 9.54.0-10, 10.01.2-1
ghostscript-x11 - addressed in versions 9.54.0-10, 10.01.2-1
ghostscript-tools-printing - addressed in versions 9.54.0-10, 10.01.2-1
ghostscript-tools-fonts - addressed in versions 9.54.0-10, 10.01.2-1
ghostscript - addressed in versions 9.54.0-10, 10.01.2-1
ghostscript-tools-dvipdf - addressed in versions 9.54.0-10, 10.01.2-1
ghostscript-doc - addressed in versions 9.54.0-10, 10.01.2-1
ghostscript - update to 9.56.1-7
ghostscript - addressed in versions 9.56.1-8.fc37, 10.01.2-1.fc38, 10.01.2-1.fc39
ghostscript-gtk - update to 10.01.2-1
EMC Cloud Tiering Appliance - update to 13.1.0.2.33
app-text/ghostscript-gpl - update to 10.01.2
ghostscript - update to 9.55.0
ghostscript (Ubuntu package) - addressed in versions 9.50~dfsg-5ubuntu4.8, 9.55.0~dfsg1-0ubuntu5.3, 9.56.1~dfsg1-0ubuntu3.2, 10.0.0~dfsg1-0ubuntu1.2

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins