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.
What to do
Likely to be exploited: EPSS gives a 86% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | ghostscript | Fixed | 9.54.0~dfsg1-0ubuntu2 | UBUNTU-CVE-2021-3781 |
| Ubuntu 20.04 | ghostscript | Fixed | 9.50~dfsg-5ubuntu4.3 | UBUNTU-CVE-2021-3781 |
| Ubuntu 16.04 | ghostscript | Fix pending | ||
| Ubuntu 14.04 | ghostscript | Fix pending | ||
| Debian 14 | ghostscript | Fixed | 9.53.3~dfsg-8 | DEBIAN-CVE-2021-3781 |
| Debian 13 | ghostscript | Fixed | 9.53.3~dfsg-8 | DEBIAN-CVE-2021-3781 |
| Debian 12 | ghostscript | Fixed | 9.53.3~dfsg-8 | DEBIAN-CVE-2021-3781 |
| Red Hat Enterprise Linux 9 | ghostscript | Not affected | ||
| Red Hat Enterprise Linux 9 | ghostscript-doc | Not affected | ||
| Red Hat Enterprise Linux 9 | ghostscript-tools-dvipdf | Not affected | ||
| Red Hat Enterprise Linux 9 | ghostscript-tools-fonts | Not affected | ||
| Red Hat Enterprise Linux 9 | ghostscript-tools-printing | Not affected | ||
| Red Hat Enterprise Linux 9 | ghostscript-x11 | Not affected | ||
| Red Hat Enterprise Linux 9 | libgs | Not affected | ||
| Red Hat Enterprise Linux 9 | libgs-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | ghostscript | Not affected | ||
| Red Hat Enterprise Linux 8 | ghostscript-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | ghostscript-tools-dvipdf | Not affected | ||
| Red Hat Enterprise Linux 8 | ghostscript-tools-fonts | Not affected | ||
| Red Hat Enterprise Linux 8 | ghostscript-tools-printing | Not affected | ||
| Red Hat Enterprise Linux 8 | ghostscript-x11 | Not affected | ||
| Red Hat Enterprise Linux 8 | libgs | Not affected | ||
| Red Hat Enterprise Linux 8 | libgs-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | ghostscript | Not affected | ||
| Red Hat Enterprise Linux 7 | ghostscript-cups | Not affected | ||
| Red Hat Enterprise Linux 7 | ghostscript-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | ghostscript-doc | Not affected | ||
| Red Hat Enterprise Linux 7 | ghostscript-gtk | Not affected | ||
| Red Hat Enterprise Linux 7 | libgs | Not affected | ||
| Red Hat Enterprise Linux 7 | libgs-devel | Not affected | ||
| Red Hat Enterprise Linux 6 | ghostscript | Not affected | ||
| Red Hat Enterprise Linux 6 | ghostscript-devel | Not affected | ||
| Red Hat Enterprise Linux 6 | ghostscript-doc | Not affected | ||
| Red Hat Enterprise Linux 6 | ghostscript-gtk | Not affected | ||
| Alpine Linux 3.24 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.23 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.22 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.21 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.20 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.19 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.18 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.17 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.16 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.15 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.14 | ghostscript | Fixed | 9.54-r1 | ALPINE-CVE-2021-3781 |
| Alpine Linux 3.13 | ghostscript | Fixed | 9.53.3-r1 | ALPINE-CVE-2021-3781 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- ghostscript: affected: ghostpdl 9.55.0
Vendor advisories:
- https://security.gentoo.org/glsa/202211-11 (vendor-advisory)
References
- https://bugzilla.redhat.com/show_bug.cgi?id=2002271
- https://ghostscript.com/CVE-2021-3781.html
- https://security.gentoo.org/glsa/202211-11
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.