CVE-2024-33869
Ghostscript vulnerability analysis and mitigation

Overview

A path traversal and command execution vulnerability was discovered in Artifex Ghostscript versions before 10.03.1. The vulnerability (CVE-2024-33869) was disclosed in July 2024 and affects the path reduction functionality in base/gpmisc.c. This security flaw allows attackers to bypass restrictions on the use of %pipe% through crafted PostScript documents (NVD, Ghostscript Bugzilla).

Technical details

The vulnerability exists in the 'gpvalidatepathlen' function which first tests if a path has a current working directory (cwd) prefix and then reduces the path. For example, with a path like './../tmp/aa', it first identifies the cwd prefix and reduces it to '../tmp/aa'. When validation fails, it attempts to validate without the cwd prefix by skipping the first two characters, which inadvertently skips the '..' and validates '/tmp/aa' as an allowed path. Additionally, path reduction has a flaw where 'aa/../%pipe%command#' gets reduced to '%pipe%command#', potentially allowing command execution ([Ghostscript Bugzilla](https://bugs.ghostscript.com/showbug.cgi?id=707691)).

Impact

The vulnerability can lead to path traversal and command execution through crafted PostScript documents. When exploited, it allows attackers to bypass security restrictions and potentially access or modify files outside of permitted directories. In specific configurations, it can also enable command execution through the %pipe% functionality (NVD, OSS Security).

Mitigation and workarounds

The vulnerability has been fixed in Ghostscript version 10.03.1. The patch modifies the path reduction functionality to ensure paths do not change type during reduction and properly handles device specifications. Users are strongly recommended to upgrade to version 10.03.1 or later (NVD, Red Hat).

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