RCE bug in widely used Ghostscript library now exploited in attacks

Share:

A remote code execution vulnerability in the Ghostscript document conversion toolkit, widely used on Linux systems, is currently being exploited in attacks.

Ghostscript comes pre-installed on many Linux distributions and is used by various document conversion software, including ImageMagick, LibreOffice, GIMP, Inkscape, Scribus, and the CUPS printing system.

Tracked as CVE-2024-29510, this format string vulnerability impacts all Ghostscript 10.03.0 and earlier installations. It enables attackers to escape the -dSAFER sandbox (enabled by default) because unpatched Ghostscript versions fail to prevent changes to uniprint device argument strings after the sandbox is activated.

This security bypass is especially dangerous as it allows them to perform high-risk operations, such as command execution and file I/O, using the Ghostscript Postscript interpreter, which the sandbox would usually block.

“This vulnerability has significant impact on web-applications and other services offering document conversion and preview functionalities as these often use Ghostscript under the hood,” warned Codean Labs security researchers who discovered and reported the security vulnerability.

“We recommend verifying whether your solution (indirectly) makes use of Ghostscript and if so, update it to the latest version.”

Codean Labs has also shared this Postscript file that can help defenders detect if their systems are vulnerable to CVE-2023-36664 attacks by running it with the following command:

ghostscript -q -dNODISPLAY -dBATCH CVE-2024-29510_testkit.ps

Actively exploited in attacks

While the Ghostscript development team patched the security flaw in May, Codean Labs published a write-up with technical details and proof-of-concept exploit code two months later.

Attackers are already exploiting the CVE-2024-29510 Ghostscript vulnerability in the wild, using EPS (PostScript) files camouflaged as JPG (image) files to get shell access to vulnerable systems.

“If you have ghostscript *anywhere* in your production services, you are probably vulnerable to a shockingly trivial remote shell execution, and you should upgrade it or remove it from your production systems,” developer Bill Mill warned.

“The best mitigation against this vulnerability is to update your installation of Ghostscript to v10.03.1. If your distribution does not provide the latest Ghostscript version, it might still have released a patch version containing a fix for this vulnerability (e.g., Debian, Ubuntu, Fedora),” Codean Labs added.

One year ago, the Ghostscript developers patched another critical RCE flaw (CVE-2023-36664) also triggered by opening maliciously crafted files on unpatched systems.

Leave a Comment

Your email address will not be published. Required fields are marked *

loader-image
London, GB
8:49 pm, Jan 19, 2025
weather icon 3°C
L: 2° | H: 4°
broken clouds
Humidity: 84 %
Pressure: 1020 mb
Wind: 3 mph SE
Wind Gust: 0 mph
UV Index: 0
Precipitation: 0 mm
Clouds: 75%
Rain Chance: 0%
Visibility: 10 km
Sunrise: 7:55 am
Sunset: 4:26 pm
DailyHourly
Daily ForecastHourly Forecast
Today 9:00 pm
weather icon
2° | 4°°C 0 mm 0% 2 mph 84 % 1020 mb 0 mm/h
Tomorrow 9:00 pm
weather icon
3° | 7°°C 0 mm 0% 6 mph 88 % 1020 mb 0 mm/h
Tue Jan 21 9:00 pm
weather icon
2° | 7°°C 0 mm 0% 4 mph 95 % 1017 mb 0 mm/h
Wed Jan 22 9:00 pm
weather icon
4° | 6°°C 1 mm 100% 6 mph 99 % 1009 mb 0 mm/h
Thu Jan 23 9:00 pm
weather icon
4° | 8°°C 1 mm 100% 14 mph 89 % 1006 mb 0 mm/h
Today 9:00 pm
weather icon
3° | 4°°C 0 mm 0% 2 mph 84 % 1020 mb 0 mm/h
Tomorrow 12:00 am
weather icon
3° | 3°°C 0 mm 0% 2 mph 79 % 1020 mb 0 mm/h
Tomorrow 3:00 am
weather icon
3° | 3°°C 0 mm 0% 2 mph 74 % 1019 mb 0 mm/h
Tomorrow 6:00 am
weather icon
4° | 4°°C 0 mm 0% 1 mph 71 % 1019 mb 0 mm/h
Tomorrow 9:00 am
weather icon
4° | 4°°C 0 mm 0% 3 mph 72 % 1019 mb 0 mm/h
Tomorrow 12:00 pm
weather icon
6° | 6°°C 0 mm 0% 5 mph 70 % 1019 mb 0 mm/h
Tomorrow 3:00 pm
weather icon
7° | 7°°C 0 mm 0% 6 mph 76 % 1017 mb 0 mm/h
Tomorrow 6:00 pm
weather icon
5° | 5°°C 0 mm 0% 4 mph 82 % 1018 mb 0 mm/h
Name Price24H (%)
Bitcoin(BTC)
€103,178.21
2.09%
Ethereum(ETH)
€3,314.71
4.38%
XRP(XRP)
€3.11
0.21%
Tether(USDT)
€0.97
-0.02%
Solana(SOL)
€267.31
9.35%
Dogecoin(DOGE)
€0.382809
0.27%
USDC(USDC)
€0.97
0.00%
Shiba Inu(SHIB)
€0.000021
-3.10%
Pepe(PEPE)
€0.000018
-2.79%
Peanut the Squirrel(PNUT)
€0.488750
-0.13%
Scroll to Top