CVE-2024-29510: Medium severity ghostscript vulnerability

Published Jun 24, 2024
·
Updated

Artifex Ghostscript before 10.03.1 allows memory corruption, and SAFER sandbox bypass, via format string injection with a uniprint device.

Other sources

The uniprint device allows the user to provide various string fragments as device options, which are later appended to the output file. Two of these parameters, upWriteComponentCommands and upYMoveCommand, are actually treated as format strings, specifically for gpfprintf and gssnprintf. For these, the intention is for the user to include just one format specifier in the string, but there is no logic preventing arbitrary format strings (with multiple specifiers) from being used.

With full control over the format string (by setting a page device with the respective options), and read access to the device output (by setting it to a temporary file path), an attacker can abuse this to leak data from the stack and perform memory corruption. This is specifically impactful in the cases of gssnprintf (as opposed to gpfprintf), as its format-string parsing logic is not hardened by compiler measures like DFORTIFYSOURCE, while it still supports the %n modifier.

References: https://ghostscript.readthedocs.io/en/gs10.03.1/News.html https://bugs.ghostscript.com/showbug.cgi?id=707662

Upstream commit: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=3b1735085ecef20b29e8db3416ab36de93e86d1f

Red Hat

Affected Software

3 affected componentsFixes available
debian/ghostscript
9.53.3~dfsg-7+deb11u710.0.0~dfsg-11+deb12u410.0.0~dfsg-11+deb12u510.03.1~dfsg-2
redhat/ghostscript<10.03.1
10.03.1
Artifex GhostScript<10.03.1

Event History

Jul 3, 2024
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·07:15 PM
DescriptionSeverityWeakness
Jul 5, 2024
News Published
via The Register·12:34 PM
News Published
via The Register·12:36 PM
Jul 8, 2024
News Published
via BleepingComputer·04:26 PM
News Published
via BleepingComputer·04:27 PM
Sep 15, 2024
Data Sourced
via Ubuntu·12:23 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-29510?

CVE-2024-29510 is classified as a high severity vulnerability due to its potential for memory corruption and exploitation.

2

How do I fix CVE-2024-29510?

To remediate CVE-2024-29510, update Ghostscript to version 10.03.1 or later.

3

What is the impact of CVE-2024-29510?

CVE-2024-29510 can lead to memory corruption and allow attackers to bypass the SAFER sandbox.

4

Which versions of Ghostscript are affected by CVE-2024-29510?

CVE-2024-29510 affects Ghostscript versions prior to 10.03.1.

5

Is CVE-2024-29510 easily exploitable?

CVE-2024-29510 can be exploited through format string injection via the uniprint device, making it a serious security concern.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203