Ghostscript Vulnerability: CVE-2019-3838 - Unauthorized File System Access

ghostscript Updated 02 Oct 2025

Summary

25/03/2019
N/A
Yes i
Medium
5.5

ALPINE-CVE-2019-3838: It was found that the forceput operator could be extracted from the DefineResource method in ghostscript before 9.27. Affects ghostscript versions < 9.26-r2. Fixed in 9.26-r2. 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 for PDF. It is widely used for processing and rendering documents in various formats. The package is known for its ability to convert files, manage printing tasks, and serve as a backend for various applications. However, it has been found to be vulnerable to a specific issue that allows unauthorized access to the file system, which can lead to significant security risks.

Vulnerability Detail

The vulnerability, identified as CVE-2019-3838, arises from a flaw in the handling of the 'forceput' operator within the DefineResource method of Ghostscript versions prior to 9.27. An attacker can exploit this vulnerability by crafting a malicious PostScript file that circumvents the security constraints imposed by the -dSAFER option. This could allow the attacker to access sensitive files on the system, leading to potential data breaches and unauthorized actions.

How To Fix

Minimum fixed version

9.26-r2

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, you can disable the execution of potentially harmful PostScript files by avoiding the use of the -dSAFER option, although this is not a recommended long-term solution as it may expose your system to other risks.

Conclusion

CVE-2019-3838 is a significant vulnerability in Ghostscript that can lead to unauthorized file system access. It is crucial for users to update to the patched version to mitigate risks. Monitoring tools like Vulert can assist in identifying vulnerabilities in your applications.

See every vulnerability recorded for ghostscript →

Share this vulnerability

FAQ

CVE-2019-3838 is a vulnerability in Ghostscript that allows unauthorized access to the file system through a specially crafted PostScript file.

If you are using a version of Ghostscript prior to 9.26-r2, your system is vulnerable. You can check your installed version using the command 'ghostscript --version'.

Exploitation of this vulnerability can lead to unauthorized access to sensitive files, potentially resulting in data breaches and other security incidents.

Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using just a manifest file like package-lock.json.

The CVSS score for CVE-2019-3838 is 5.5, indicating a moderate level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for ghostscript.

How To Fix

Minimum fixed version

9.26-r2

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