July 2nd, 2024

CVE-2024-29510 – Exploiting Ghostscript using format strings

A format string vulnerability in Ghostscript up to version 10.03.0 allows code execution by bypassing the -dSAFER sandbox. Security experts urge updating to prevent potential remote code execution risks.

Read original articleLink Icon
CVE-2024-29510 – Exploiting Ghostscript using format strings

A format string vulnerability, CVE-2024-29510, affecting Ghostscript versions up to 10.03.0, allows bypassing the -dSAFER sandbox to achieve code execution. This vulnerability impacts web applications and services utilizing Ghostscript for document conversion and preview functionalities. Codean Labs discovered this issue as part of a series on Ghostscript vulnerabilities. Ghostscript, a Postscript interpreter and document conversion tool, is commonly used in automated systems handling user-supplied files, often indirectly through tools like ImageMagick and LibreOffice. The -dSAFER sandbox in Ghostscript restricts I/O operations to prevent dangerous activities like command execution. However, the sandbox's limitations can be circumvented, enabling file manipulation and potential remote code execution. Ghostscript supports various output devices and document types, making it highly configurable via command-line parameters. The versatility of Ghostscript, combined with the format string vulnerability, poses a significant security risk, especially when handling untrusted files. Security researchers emphasize the importance of updating Ghostscript to the latest version to mitigate these vulnerabilities.

Link Icon 3 comments
By @mistrial9 - 7 months
for v10.03 or less from the article.. patched in Debian systems last May ?

https://tracker.debian.org/pkg/ghostscript

By @olliej - 7 months
%n strikes again.

I believe that by default on osx %n is only respected if the format string is in readonly memory, I thought the default in Linux was to just ignore it?

By @pryelluw - 7 months
Friendly question given the fatigue around bs critical CVEs. Is this properly rated?