Home / ghostscript / ghostscript / CVE-2021-3781
CVE-2021-3781: is it exploited, and which versions of ghostscript are affected and fixed?
CVE-2021-3781 is an improper input validation vulnerability in ghostscript. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 16:09 UTC). Affected: ghostscript ghostpdl 9.55.0 (CVE record by redhat). No fixed version is listed in the sources yet; check the vendor advisory. Severity: Critical (9.9, CVSS 3.1, from NVD).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 16:09 UTC, CVE record November 19, 2026, 07:15 UTC and NVD November 19, 2026, 07:51 UTC.
What is CVE-2021-3781?
A trivial sandbox (enabled with the `-dSAFER` option) escape flaw was found in the ghostscript interpreter by injecting a specially crafted pipe command. This flaw allows a specially crafted document to execute arbitrary commands on the system in the context of the ghostscript interpreter. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.
From the CVE record by redhat, last updated August 3, 2024, 17:09 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| ghostscript | ghostpdl 9.55.0 |
As the CVE record by redhat states it, last updated August 3, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| artifex | ghostscript | 9.50 | application |
| artifex | ghostscript | 9.52 | application |
| artifex | ghostscript | 9.53.3 | application |
| artifex | ghostscript | 9.54.0 | application |
| fedoraproject | fedora | 34 | operating system |
NVD analysis (status Modified), last modified June 17, 2026, 04:05 UTC.
How severe is CVE-2021-3781?
| Score | Version | Vector | Source |
|---|---|---|---|
| Critical 9.9 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H | NVD |
| High 9.3 | CVSS 2.0 | AV:N/AC:M/Au:N/C:C/I:C/A:C | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2021-3781 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 85.6% probability of exploitation activity in the next 30 days, percentile 99.7 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-20 Improper Input Validation
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
Where are the vendor advisories and references?
- https://bugzilla.redhat.com/show_bug.cgi?id=2002271
- https://ghostscript.com/CVE-2021-3781.html
- GLSA-202211-11 vendor-advisory
When was it published, and where is the official record?
- Reserved
- September 9, 2021
- Published
- February 16, 2022, 00:00 UTC
- CVE record updated
- August 3, 2024, 17:09 UTC by redhat
- NVD
- Modified, last modified June 17, 2026, 04:05 UTC
- Last checked
- CVE list November 19, 2026, 07:15 UTC; NVD November 19, 2026, 07:51 UTC; KEV December 3, 2026, 16:09 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect ghostscript?
- Jun 16, 2022CVE-2022-2085 GhostScript: NULL pointer dereference (crash)
- Sep 3, 2020CVE-2020-14373 ghostscript: use after free
- Nov 27, 2019CVE-2019-10216 ghostscript: incorrect Use of Privileged APIs
- Nov 15, 2019CVE-2019-14869 ghostscript: incorrect Use of Privileged APIs
- Apr 23, 2018CVE-2016-9601 ghostscript: integer overflow
- Oct 27, 2014CVE-2010-4820 Ghostscript: code injection (remote code execution)
- Sep 18, 2012CVE-2012-4405 Argyllcms Cms: n/a
- Dec 21, 2009CVE-2009-4270 Ghostscript: memory corruption (buffer overflow)
Questions about CVE-2021-3781
Is CVE-2021-3781 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 16:09 UTC. FIRST's EPSS gives it a 85.6% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of ghostscript are affected by CVE-2021-3781?
ghostscript ghostpdl 9.55.0, per the CVE record by redhat. The tables above give every range the sources list.
Which version fixes CVE-2021-3781?
None of the sources (the CVE record, the NVD and GitHub's reviewed advisories) lists a fixed version yet. Check the vendor's advisory in the references.
How severe is CVE-2021-3781?
Critical (9.9, CVSS 3.1, from NVD). The severity table above shows each score with its source.
Where is the official record of CVE-2021-3781?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.