CVE-2022-2085
Ghostscript vulnerability analysis and mitigation

Overview

A NULL pointer dereference vulnerability (CVE-2022-2085) was discovered in Ghostscript, which occurs when it attempts to render a large number of bits in memory. The vulnerability affects Ghostscript version 9.55.0 and was discovered in February 2022 (Ghostscript Bug).

Technical details

When allocating a buffer device, Ghostscript relies on an init_device_procs being defined for the device used as a prototype. The device selection depends on the number of bits per pixel. For bpp > 64, mem_x_device is used, which did not have an init_device_procs defined. This condition is particularly rare as very few devices use more than 64 bits per pixel, with DeviceN being one of the few exceptions. The vulnerability has a CVSS v3.1 Base Score of 5.5 (MEDIUM) with vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H (NVD).

Impact

If exploited, this vulnerability allows an attacker to trigger a NULL pointer dereference flaw by parsing a large number of bits (more than 64 bits per pixel), causing the application to crash and resulting in a denial of service (NVD).

Exploitability

The vulnerability requires user interaction to open a specially crafted PDF file. The attack can be executed locally with no privileges required, though user interaction is necessary (NVD).

Mitigation and workarounds

The vulnerability was fixed in Ghostscript versions 9.56.1 and later. Users are advised to upgrade to the patched version. The fix involves adding an init_device_procs entry for mem_x_device (Ghostscript Bug, Gentoo Advisory).

Additional resources


SourceThis report was generated using AI

Related Ghostscript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59800MEDIUM5.5
  • Ghostscript logoGhostscript
  • ghostscript-devel
NoYesSep 22, 2025
CVE-2025-59799MEDIUM5.5
  • Ghostscript logoGhostscript
  • libgs-debuginfo
NoYesSep 22, 2025
CVE-2025-59798MEDIUM5.5
  • Ghostscript logoGhostscript
  • ghostscript
NoYesSep 22, 2025
CVE-2025-59801MEDIUM4.3
  • Ghostscript logoGhostscript
  • ghostscript-devel
NoYesSep 22, 2025
CVE-2026-6192LOW1.9
  • Ghostscript logoGhostscript
  • openjpeg
NoYesApr 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management