Critical Path Traversal and Command Execution Vulnerability in Ghostscript

ghostscript Updated 02 Oct 2025

Summary

03/07/2024
N/A
Yes i
Unrated
Not published

ALPINE-CVE-2024-33869: An issue was discovered in Artifex Ghostscript before 10.03.1. Affects ghostscript versions < 10.04.0-r0. Fixed in 10.04.0-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Ghostscript is an interpreter for the PostScript language and for PDF. It is widely used for processing and rendering documents in various formats. The package is known for its powerful capabilities in handling graphics and text, making it a staple in many applications. However, it has been identified to have a vulnerability that allows for path traversal and command execution through crafted PostScript documents, which can lead to unauthorized access and execution of commands.

Vulnerability Detail

An issue was discovered in Artifex Ghostscript before version 10.03.1. The vulnerability arises from improper path reduction in the base/gpmisc.c file, allowing attackers to bypass restrictions on the use of %pipe%. This can lead to path traversal and command execution vulnerabilities when a malicious PostScript document is processed. The ramifications include potential unauthorized access to the system and execution of arbitrary commands, posing significant security risks.

How To Fix

Minimum fixed version

10.04.0-r0

This is the first release that contains the fix.

sudo apk add --upgrade ghostscript

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid processing untrusted PostScript documents until the package is updated to a secure version. Additionally, consider implementing strict input validation and sanitization for any documents processed by Ghostscript.

Conclusion

The identified vulnerability in Ghostscript poses significant risks due to its ability to allow path traversal and command execution through malicious PostScript documents. It is crucial to update to the patched versions to mitigate these risks and ensure the security of applications utilizing Ghostscript.

See every vulnerability recorded for ghostscript →

Share this vulnerability

FAQ

The vulnerability allows for path traversal and command execution through crafted PostScript documents.

You can use Vulert's playground at Vulert Scanner to check if your application is affected without requiring any signup.

Ghostscript versions before 10.03.1 are affected, specifically in Alpine v3.18 to v3.22.

As a workaround, avoid processing untrusted PostScript documents and implement strict input validation.

Detailed information can be found in the CVE report for ALPINE-CVE-2024-33869.

Related vulnerabilities

Recent vulnerabilities recorded for ghostscript.

How To Fix

Minimum fixed version

10.04.0-r0

This is the first release that contains the fix.

sudo apk add --upgrade ghostscript

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback