Negative-size-param vulnerability in ghostscript

ghostscript Updated 02 Oct 2025

Summary

08/08/2024
N/A
No i
Unrated
Not published

OSV-2024-728: Negative-size-param in pdf_resize_resource_arrays. Affects ghostscript versions >= 441c9e3a4ca08fa7f7c00063af33196b0d88ebaf. 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 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 open-source interpreter for the PostScript language and the Adobe Portable Document Format (PDF). It is widely used for rendering PDF files and converting them to other formats. The vulnerability identified in Ghostscript allows an attacker to trigger a negative-size-param crash, leading to potential denial of service or arbitrary code execution.

Vulnerability Detail

The vulnerability arises from a negative-size-param crash in the pdf_resize_resource_arrays function. This crash occurs during the processing of cmap text in PDF files. An attacker can exploit this vulnerability by crafting a malicious PDF file that triggers the crash when parsed by Ghostscript. The impact of this vulnerability can range from crashing the application to executing arbitrary code with the privileges of the user running 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 →

Workaround

As a temporary workaround, users can consider disabling the processing of cmap text in Ghostscript. This can be achieved by modifying the configuration or command-line options to exclude the cmap text processing functionality. However, this workaround may impact the rendering of certain PDF files, so it should only be used as a temporary measure until the software is updated.

Conclusion

The negative-size-param vulnerability in Ghostscript can be exploited by an attacker to crash the application or execute arbitrary code. It is crucial to update Ghostscript to the latest version that includes the fix for this vulnerability. In the meantime, users can consider using the provided workaround to mitigate the risk.

See every vulnerability recorded for ghostscript →

Share this vulnerability

FAQ

Ghostscript is an open-source interpreter for the PostScript language and the Adobe Portable Document Format (PDF). It is commonly used for rendering PDF files and converting them to other formats.

The vulnerability can result in a denial of service condition or allow an attacker to execute arbitrary code with the privileges of the user running Ghostscript.

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

As a temporary workaround, users can disable the processing of cmap text in Ghostscript. However, this may affect the rendering of certain PDF files.

More information about this vulnerability can be found in the OSS-Fuzz report linked in the vulnerability details.

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