Negative-size-param in general_endcidrange_func in ghostscript

ghostscript Updated 02 Oct 2025

Summary

17/12/2021
N/A
Yes i
Unrated
Not published

OSV-2021-1707: Negative-size-param in general_endcidrange_func. Affects ghostscript versions >= 75fbddf52051987287e62d13c659eb73ba16982f, < cb2b78cddfc67fee13b4bec3f16747f2ec611793. Fixed in cb2b78cddfc67fee13b4bec3f16747f2ec611793. 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 interpreter for the PostScript language and for PDF files. It is widely used for rendering and converting documents in various formats. The general_endcidrange_func function in Ghostscript is responsible for handling CID ranges in CMap files. A vulnerability has been discovered in this function that allows for a negative-size parameter, leading to a crash.

Vulnerability Detail

The vulnerability occurs when the general_endcidrange_func function in Ghostscript is called with a negative-size parameter. This can result in a crash, potentially leading to a denial of service or other security implications. The issue was reported through the OSS-Fuzz project and has been assigned the identifier OSV-2021-1707. More details can be found in the provided OSS-Fuzz report.

How To Fix

Minimum fixed version

cb2b78cddfc67fee13b4bec3f16747f2ec611793

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to apply the fix as mentioned in the 'how_to_fix' section.

Conclusion

In conclusion, a vulnerability has been discovered in the general_endcidrange_func function in Ghostscript that allows for a negative-size parameter. This can result in a crash, potentially leading to a denial of service or other security implications. Users are advised to update their installations to a patched version of Ghostscript that includes the fix for this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ghostscript →

Share this vulnerability

FAQ

Ghostscript is an interpreter for the PostScript language and for PDF files. It is commonly used for rendering and converting documents in various formats.

This vulnerability can lead to a crash in Ghostscript, potentially resulting in a denial of service or other security implications.

This vulnerability was discovered through the OSS-Fuzz project, which performs continuous fuzz testing on open source software.

Yes, a fix for this vulnerability is available in the Ghostscript Git repository. Users should update their installations to a version that includes this fix.

There are no known workarounds for this vulnerability. It is recommended to apply the fix as mentioned in the 'how_to_fix' section.

Related vulnerabilities

Recent vulnerabilities recorded for ghostscript.

How To Fix

Minimum fixed version

cb2b78cddfc67fee13b4bec3f16747f2ec611793

This is the first release that contains the fix.

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