# CVE-2022-2085: A NULL pointer dereference vulnerability was found in Ghostscript, which occurs when it tries to render a large number of bits in memory.

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.41%, higher than 73% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-06-16T00:00:00.000Z
- Modified: 2026-06-17T04:41:15.310Z
- Weaknesses: CWE-476
- Assigned by: redhat

## Description

A NULL pointer dereference vulnerability was found in Ghostscript, which occurs when it tries to render a large number of bits in memory. When allocating a buffer device, it relies on an init_device_procs defined for the device that uses it as a prototype that depends upon the number of bits per pixel. For bpp > 64, mem_x_device is used and does not have an init_device_procs defined. This flaw allows an attacker to parse a large number of bits (more than 64 bits per pixel), which triggers a NULL pointer dereference flaw, causing an application to crash.

(As written by CVE List.)

## Affected

- GhostScript: Affects in Ghostscript v9.55.0
- artifex ghostscript: 9.55.0
- fedoraproject fedora: 35; 36

## Every score

- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:N/A:P`

## References

- <https://bugs.ghostscript.com/show_bug.cgi?id=704945> (exploit, issue-tracking, mailing-list, patch, vendor-advisory)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2095261> (issue-tracking, patch, third-party-advisory)
- <http://git.ghostscript.com/?p=ghostpdl.git%3Bh=ae1061d948d88667bdf51d47d918c4684d0f67df>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ERSZX5LKDWAHZWJYBMP2E2UHOPUCDEGV/> (vendor-advisory)
- <https://security.gentoo.org/glsa/202211-11> (third-party-advisory, vendor-advisory)
- <https://security.gentoo.org/glsa/202309-03>

## Sources

- CVE List: [CVE-2022-2085](https://www.cve.org/CVERecord?id=CVE-2022-2085), CVE Terms of Use, modified 2025-02-13
- NVD: [CVE-2022-2085](https://nvd.nist.gov/vuln/detail/CVE-2022-2085), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-2085 · Whole record: https://cve.day/CVE-2022-2085.json · Rebuilt by cve.day 2026-11-25T22:58:12.428Z
