Null-dereference READ in gstate_clone_core in ghostscript

ghostscript Updated 02 Oct 2025

Summary

24/01/2022
N/A
No i
Unrated
Not published

OSV-2022-80: Null-dereference READ in gstate_clone_core. Affected versions are not published. No fix is published. 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 Penetration testing for web, API and mobile 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 open-source interpreter for the PostScript language and the PDF file format. It is widely used for rendering and converting documents. The gstate_clone_core function in Ghostscript is responsible for cloning the graphics state, which includes information about the current transformation matrix, color space, and other attributes. This vulnerability allows an attacker to trigger a null-dereference read, leading to a crash in the gstate_clone_core function.

Vulnerability Detail

The null-dereference read vulnerability in gstate_clone_core can be exploited by an attacker to cause a crash in Ghostscript. This can potentially be leveraged to execute arbitrary code or cause a denial-of-service condition. The vulnerability occurs when the gs_gsave function is called, which saves the current graphics state. During this process, the gstate_clone_core function is invoked, and if certain conditions are met, a null-dereference read occurs. This vulnerability was reported through the OSS-Fuzz project.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a workaround, users can avoid triggering the vulnerable code path by modifying their usage of Ghostscript. However, this may not be a feasible solution for all cases, and it is strongly recommended to apply the official patch or upgrade to the latest version.

Conclusion

The null-dereference read vulnerability in gstate_clone_core in Ghostscript can lead to a crash and potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition. It is crucial to update Ghostscript to the latest version or apply the official patch to mitigate this vulnerability. For further support and assistance with vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for ghostscript →

Share this vulnerability

FAQ

Ghostscript is an open-source interpreter for the PostScript language and the PDF file format. It is commonly used for rendering and converting documents.

This vulnerability can lead to a crash in Ghostscript, which may allow an attacker to execute arbitrary code or cause a denial-of-service condition.

To fix this vulnerability, it is recommended to update Ghostscript to a version that includes the patch for this issue.

As a workaround, users can modify their usage of Ghostscript to avoid triggering the vulnerable code path. However, it is recommended to apply the official patch or upgrade to the latest version.

If you have discovered a new vulnerability or have additional information about this issue, you can report it to the Ghostscript development team or the OSS-Fuzz project.

Related vulnerabilities

Recent vulnerabilities recorded for ghostscript.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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