CVE-2023-43115 Command injection in n/a

High 8.8 Published Updated

Attackers can achieve remote code execution by crafting PostScript documents that manipulate IJS device settings in Ghostscript.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-43115?

CVE-2023-43115 is a high-severity command injection vulnerability in Artifex Ghostscript, published on 18 Sep 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

In Artifex Ghostscript through 10.01.2, gdevijs.c in GhostPDL can lead to remote code execution via crafted PostScript documents because they can switch to the IJS device, or change the IjsServer parameter, after SAFER has been activated. NOTE: it is a documented risk that the IJS server can be specified on a gs command line (the IJS device inherently must execute a command to start the IJS server).

Which versions are affected by CVE-2023-43115?

It affects 2 products.

Linux distribution packages (40)
ghostscript AlmaLinux:9All versions9.54.0-11.el9_2
ghostscript AlmaLinux:9All versions9.54.0-14.el9_3
ghostscript-doc AlmaLinux:9All versions9.54.0-11.el9_2
ghostscript-doc AlmaLinux:9All versions9.54.0-14.el9_3
ghostscript-tools-dvipdf AlmaLinux:9All versions9.54.0-11.el9_2
ghostscript-tools-dvipdf AlmaLinux:9All versions9.54.0-14.el9_3
ghostscript-tools-fonts AlmaLinux:9All versions9.54.0-11.el9_2
ghostscript-tools-fonts AlmaLinux:9All versions9.54.0-14.el9_3
ghostscript-tools-printing AlmaLinux:9All versions9.54.0-11.el9_2
ghostscript-tools-printing AlmaLinux:9All versions9.54.0-14.el9_3
ghostscript-x11 AlmaLinux:9All versions9.54.0-11.el9_2
ghostscript-x11 AlmaLinux:9All versions9.54.0-14.el9_3
libgs AlmaLinux:9All versions9.54.0-11.el9_2
libgs AlmaLinux:9All versions9.54.0-14.el9_3
libgs-devel AlmaLinux:9All versions9.54.0-11.el9_2
libgs-devel AlmaLinux:9All versions9.54.0-14.el9_3
ghostscript Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
ghostscript Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
ghostscript-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
ghostscript-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
ghostscript-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
ghostscript-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
ghostscript-doc Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
ghostscript-doc Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
ghostscript-gtk-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
ghostscript-gtk-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
ghostscript-tools-dvipdf Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
ghostscript-tools-dvipdf Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
ghostscript-tools-fonts Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
ghostscript-tools-fonts Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
ghostscript-tools-printing Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
ghostscript-tools-printing Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
ghostscript-x11 Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
ghostscript-x11 Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
ghostscript-x11-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
ghostscript-x11-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
libgs Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
libgs Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3
libgs-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-11.el9_2
libgs-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:9.54.0-14.el9_3

Products include Artifex Ghostscript, Fedoraproject Fedora.

How do I fix CVE-2023-43115?

Apply the vendor's patch.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2023-43115 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

All Artifex Ghostscript vulnerabilities

Sources

Also known as ALPINE-CVE-2023-43115, ALSA-2023:6265, ALSA-2023:6732, BELL-CVE-2023-43115, DEBIAN-CVE-2023-43115, GHSA-9p55-888j-qxrh and 12 more.

Is CVE-2023-43115 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free