Directory Traversal Vulnerability in Ghostscript Affects File Security

ghostscript Updated 02 Oct 2025

Summary

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

DEBIAN-CVE-2024-29511: Artifex Ghostscript before 10.03.1, when Tesseract is used for OCR, has a directory traversal issue that allows arbitrary file reading (and writing of error messages to arbitrary files) via OCRLanguage. Affects ghostscript versions < 10.03.0~dfsg-1. Fixed in 10.03.0~dfsg-1. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Ghostscript is an interpreter for the PostScript language and PDF files, widely used for processing and rendering documents. It is an essential tool in various applications, particularly in printing and document conversion. However, versions prior to 10.03.1 are vulnerable to a directory traversal issue when used with Tesseract for Optical Character Recognition (OCR), which can lead to unauthorized file access.

Vulnerability Detail

The vulnerability arises from a directory traversal issue in Artifex Ghostscript versions before 10.03.1 when Tesseract is utilized for OCR. This flaw allows attackers to read arbitrary files on the system and write error messages to unintended locations. For instance, by manipulating the OCRLanguage parameter, an attacker could exploit this vulnerability to access sensitive files such as /etc/passwd, potentially leading to further system compromise.

How To Fix

Minimum fixed version

10.03.0~dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-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 using Tesseract for OCR with Ghostscript until the package is updated. Additionally, ensure that proper file permissions are set to limit access to sensitive files.

Conclusion

The directory traversal vulnerability in Ghostscript poses a significant risk to file security when using Tesseract for OCR. It is crucial to update to the latest version to mitigate this risk and protect sensitive information from unauthorized access.

See every vulnerability recorded for ghostscript →

Share this vulnerability

FAQ

The vulnerability is a directory traversal issue that allows unauthorized file access when using Tesseract for OCR.

Ghostscript versions prior to 10.03.1 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability can lead to unauthorized access to sensitive files and potentially compromise the security of the system.

If an immediate update is not possible, avoid using Tesseract for OCR with Ghostscript and ensure that file permissions are properly configured.

Related vulnerabilities

Recent vulnerabilities recorded for ghostscript.

How To Fix

Minimum fixed version

10.03.0~dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-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