CVE-2024-29510
Ghostscript vulnerability analysis and mitigation

Overview

CVE-2024-29510 affects Artifex Ghostscript versions before 10.03.1. The vulnerability was discovered in March 2024 and involves a format string injection vulnerability in the uniprint device that allows memory corruption and SAFER sandbox bypass (Ghostscript Bug, NVD).

Technical details

The vulnerability exists in the uniprint device's handling of string parameters upWriteComponentCommands and upYMoveCommand, which are treated as format strings for gpfprintf and gssnprintf functions. The implementation lacks validation to prevent arbitrary format strings with multiple specifiers from being used. The format string parsing logic in gssnprintf is not hardened by compiler measures like DFORTIFY_SOURCE and supports the %n modifier, making it particularly vulnerable to exploitation (OSS Security).

Impact

This vulnerability can be exploited to leak data from the stack and perform memory corruption. The issue is particularly impactful for web applications and services offering document conversion and preview functionalities that use Ghostscript under the hood, either directly or through tools like ImageMagick and LibreOffice (Codean Labs).

Mitigation and workarounds

The vulnerability has been fixed in Ghostscript version 10.03.1. Users are advised to upgrade to this version or later. The fix prevents PostScript code from altering these parameters after SAFER is enabled, limiting them to command-line configuration only (Ghostscript Bug).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management