Ghostscript: Use After Free
CVE-2023-46751 is a high-severity use after free vulnerability in Ghostscript from Artifex, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected Ghostscript versions: 10.02.0 and earlier. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 2.02% chance of exploitation within 30 days, higher than 81% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of Ghostscript you run against the affected versions below, and install the vendor's latest release.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Artifex | Ghostscript | 10.02.0 and earlier | Not stated |
Version data comes from NVD's product matching. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by NVD.
Official description
An issue was discovered in the function gdev_prn_open_printer_seekable() in Artifex Ghostscript through 10.02.0 allows remote attackers to crash the application via a dangling pointer.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Other references
- bugs.ghostscript.com/show_bug.cgi?id=707264Permissions Required
- ghostscript.com/Product
- debian.org/security/2023/dsa-5578
Other vulnerabilities in Ghostscript
- 9.8 Critical severity
- 7.8 High severity
- 9.8 Critical severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Recent Use After Free vulnerabilities
- 8.8 High severity
- 8.8 High severity
- 8.8 High severity
- 7.8 High severity
- 7.5 High severity
- 8.8 High severity
Spotted an error? Tell us.