Heap-based buffer overflow in Ghostscript - CVE-2020-27792

 

Heap-based buffer overflow in Ghostscript - CVE-2020-27792

Published: September 20, 2022


Vulnerability identifier: #VU67506
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-2020-27792
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

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

The vulnerability exists due to a boundary error within the lp8000_print_page() function in gdevlp8k.c. A remote attacker can trick the victim to open a specially crafted PDF file, trigger a heap-based buffer overflow and execute arbitrary code on the target system.

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


Affected software

Ghostscript
Amazon Linux AMI
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for ARM 64
Red Hat CodeReady Linux Builder for x86_64
Red Hat CodeReady Linux Builder for Power, little endian
Red Hat CodeReady Linux Builder for ARM 64
Red Hat CodeReady Linux Builder for IBM z Systems
Ubuntu
Migration Toolkit for Containers
ghostscript
ghostscript (Ubuntu package)
ghostscript-x (Ubuntu package)
libgs9 (Ubuntu package)
ghostscript (Red Hat package)

How to mitigate CVE-2020-27792

Install updates from vendor's website.

Ghostscript - update to 9.50
Migration Toolkit for Containers - update to 1.8.7
ghostscript - update to 8.70-24.27
ghostscript (Ubuntu package) - addressed in versions 9.26~dfsg+00ubuntu0.16.04.14+esm4, 9.26~dfsg+0-0ubuntu0.18.04.17, 9.50~dfsg-5ubuntu4.6, 9.55.0~dfsg1-0ubuntu5.1
ghostscript-x (Ubuntu package) - update to 9.26~dfsg+00ubuntu0.16.04.14+esm4
libgs9 (Ubuntu package) - update to 9.26~dfsg+00ubuntu0.16.04.14+esm4
ghostscript (Red Hat package) - update to 9.27-16.el8_10

External References

Related Security Bulletins