Code Injection in Ghostscript - CVE-2021-3781

 

Code Injection in Ghostscript - CVE-2021-3781

Published: September 7, 2021 / Updated: September 27, 2021


Vulnerability identifier: #VU56385
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-3781
CWE-ID: CWE-94
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

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

The vulnerability exists due to improper input validation. A remote attacker can create a specially crafted SVG file, upload it to the affected system and execute arbitrary code.

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


Affected software

Ghostscript
Gentoo Linux
Arch Linux
SUSE CaaS Platform
SUSE Manager Proxy
SUSE Manager Retail Branch Server
SUSE Manager Server
SUSE Enterprise Storage
HPE Helion Openstack
SUSE OpenStack Cloud Crowbar
SUSE OpenStack Cloud
SUSE Linux Enterprise Server
SUSE Linux Enterprise Server for SAP
SUSE Linux Enterprise Software Development Kit
SUSE Linux Enterprise High Performance Computing
SUSE Linux Enterprise Module for Basesystem
SUSE Linux Enterprise Module for Desktop Applications
openEuler
Ubuntu
Fedora
ghostscript (Debian package)
libspectre1-debuginfo
libspectre1
libspectre-devel
libspectre-debugsource
ghostscript (Ubuntu package)
libgs9 (Ubuntu package)
ghostscript-help
ghostscript
ghostscript-debuginfo
ghostscript-debugsource
ghostscript-devel
ghostscript-tools-dvipdf
ghostscript-x11
ghostscript-x11-debuginfo
app-text/ghostscript-gpl

How to mitigate CVE-2021-3781

Install update from vendor's website.

Ghostscript - update to 9.55.0
ghostscript (Debian package) - update to 9.53.3~dfsg-7+deb11u1
libspectre1-debuginfo - addressed in versions 0.2.7-12.12.1, 0.2.8-3.12.1
libspectre1 - addressed in versions 0.2.7-12.12.1, 0.2.8-3.12.1
libspectre-devel - addressed in versions 0.2.7-12.12.1, 0.2.8-3.12.1
libspectre-debugsource - addressed in versions 0.2.7-12.12.1, 0.2.8-3.12.1
ghostscript (Ubuntu package) - addressed in versions 9.50~dfsg-5ubuntu4.3, 9.53.3~dfsg-7ubuntu0.1
libgs9 (Ubuntu package) - addressed in versions 9.50~dfsg-5ubuntu4.3, 9.53.3~dfsg-7ubuntu0.1
ghostscript-help - update to 9.52-6
ghostscript - update to 9.52-6
ghostscript-debuginfo - update to 9.52-6
ghostscript-debugsource - update to 9.52-6
ghostscript-devel - update to 9.52-6
ghostscript-tools-dvipdf - update to 9.52-6
ghostscript - addressed in versions 9.52-23.42.1, 9.52-155.1
ghostscript-debuginfo - addressed in versions 9.52-23.42.1, 9.52-155.1
ghostscript-debugsource - addressed in versions 9.52-23.42.1, 9.52-155.1
ghostscript-devel - addressed in versions 9.52-23.42.1, 9.52-155.1
ghostscript-x11 - addressed in versions 9.52-23.42.1, 9.52-155.1
ghostscript-x11-debuginfo - addressed in versions 9.52-23.42.1, 9.52-155.1
ghostscript - addressed in versions 9.54.0-2.1.fc33, 9.54.0-2.1.fc34, 9.54.0-4.fc35
app-text/ghostscript-gpl - update to 9.56.1

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins