Heap-use-after-free vulnerability in ghostscript

ghostscript Updated 02 Oct 2025

Summary

22/01/2022
HIGH
No i
High
Not published

OSV-2022-73: Heap-use-after-free in pdfi_cspace_free_callback. Affects ghostscript versions >= 82b097fe8e76ea92f69ef483f45c0cf491a98d43. 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 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 open-source interpreter for the PostScript language and the PDF file format. It is widely used for rendering and converting PDF files. The vulnerability in question, identified as OSV-2022-73, affects the Ghostscript package and can lead to a heap-use-after-free condition.

Vulnerability Detail

The heap-use-after-free vulnerability occurs in the pdfi_cspace_free_callback function of Ghostscript. This vulnerability can be triggered by a specific sequence of actions, resulting in a read of 8 bytes from a freed heap memory block. An attacker could potentially exploit this vulnerability to execute arbitrary code or cause a denial-of-service condition.

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

No specific workaround has been provided for this vulnerability.

Conclusion

The heap-use-after-free vulnerability in Ghostscript can have severe consequences, including arbitrary code execution or denial-of-service. It is crucial to update the Ghostscript package to a patched version to mitigate the risk. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for ghostscript →

Share this vulnerability

FAQ

This vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert analyzes your package-lock.json file and provides real-time alerts for open-source vulnerabilities.

At the time of this report, there is no known public exploit for this vulnerability.

The recommended mitigation is to update the Ghostscript package to a patched version that includes the necessary fixes.

You can find more information about this vulnerability in the OSS-Fuzz report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43904

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