CVE-2024-29506
ghostscript: stack-based buffer overflow in the pdfi_apply_filter()
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · July 3, 2024
Updated · November 21, 2025
Description
A flaw was found in Ghostscript. The PDFDEBUG flag controls the value of ctx->args.debug. In pdfi_apply_filter. This issue enables the execution of a memcpy into a stack buffer, without bounds checks. A filter name larger than 100 will overflow the str buffer, which may lead to an application crash or other unexpected behavior.
Statement
The buffer overflow vulnerability in Ghostscript's pdfi_apply_filter function, triggered by the PDFDEBUG flag, is classified as a moderate severity issue rather than high priority. This classification stems from the fact that the overflow affects a stack buffer (str) with a fixed size and is specifically related to debug information. While such an overflow could potentially lead to crashes or undefined behavior, its exploitation is constrained to scenarios where an attacker can control the PDFDEBUG flag and provides a filter name exceeding 100 characters. The specific conditions required for triggering the overflow limit its immediate risk compared to vulnerabilities with broader attack vectors or those impacting more critical components. Furthermore, this issue's impact is primarily confined to the application's stability and does not directly enable arbitrary code execution or escalate privileges without additional context.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
CVSS / CWE
CVSS 3.1 · 5.4CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L
CWE-121 · Stack-based Buffer Overflow