# CVE-2021-3781: A trivial sandbox (enabled with the -dSAFER option) escape flaw was found in the ghostscript interpreter by injecting a specially crafted p…

- Severity: Critical 9.9 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/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): 85.6%, higher than 99% of CVEs (2026-12-01)
- Published: 2022-02-16T00:00:00.000Z
- Modified: 2026-06-17T04:05:45.050Z
- Weaknesses: CWE-20, CWE-78
- Assigned by: redhat

## Description

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.

(As written by CVE List.)

## Affected

- ghostscript: ghostpdl 9.55.0
- artifex ghostscript: 9.50; 9.52; 9.53.3; 9.54.0
- fedoraproject fedora: 34

## Every score

- NVD: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- NVD: CVSS:2.0 9.3 High `AV:N/AC:M/Au:N/C:C/I:C/A:C`

## References

- <https://bugzilla.redhat.com/show_bug.cgi?id=2002271> (issue-tracking, patch, third-party-advisory)
- <https://ghostscript.com/CVE-2021-3781.html> (patch, vendor-advisory)
- <https://security.gentoo.org/glsa/202211-11> (third-party-advisory, vendor-advisory)

## Sources

- CVE List: [CVE-2021-3781](https://www.cve.org/CVERecord?id=CVE-2021-3781), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-3781](https://nvd.nist.gov/vuln/detail/CVE-2021-3781), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-3781 · Whole record: https://cve.day/CVE-2021-3781.json · Rebuilt by cve.day 2026-11-25T22:58:06.993Z
