CVEfocus › CVE database › CVE-2021-3781

CVE-2021-3781

CVSS 9.9 CriticalEPSS 85.6% (in the top 1% of all CVEs)Published 2022-02-16Updated 2024-08-03Assigner: redhat

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.

CWE-20

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

17Fixed
2Fix pending
27Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04ghostscriptFixed9.54.0~dfsg1-0ubuntu2UBUNTU-CVE-2021-3781
Ubuntu 20.04ghostscriptFixed9.50~dfsg-5ubuntu4.3UBUNTU-CVE-2021-3781
Ubuntu 16.04ghostscriptFix pending
Ubuntu 14.04ghostscriptFix pending
Debian 14ghostscriptFixed9.53.3~dfsg-8DEBIAN-CVE-2021-3781
Debian 13ghostscriptFixed9.53.3~dfsg-8DEBIAN-CVE-2021-3781
Debian 12ghostscriptFixed9.53.3~dfsg-8DEBIAN-CVE-2021-3781
Red Hat Enterprise Linux 9ghostscriptNot affected
Red Hat Enterprise Linux 9ghostscript-docNot affected
Red Hat Enterprise Linux 9ghostscript-tools-dvipdfNot affected
Red Hat Enterprise Linux 9ghostscript-tools-fontsNot affected
Red Hat Enterprise Linux 9ghostscript-tools-printingNot affected
Red Hat Enterprise Linux 9ghostscript-x11Not affected
Red Hat Enterprise Linux 9libgsNot affected
Red Hat Enterprise Linux 9libgs-develNot affected
Red Hat Enterprise Linux 8ghostscriptNot affected
Red Hat Enterprise Linux 8ghostscript-docNot affected
Red Hat Enterprise Linux 8ghostscript-tools-dvipdfNot affected
Red Hat Enterprise Linux 8ghostscript-tools-fontsNot affected
Red Hat Enterprise Linux 8ghostscript-tools-printingNot affected
Red Hat Enterprise Linux 8ghostscript-x11Not affected
Red Hat Enterprise Linux 8libgsNot affected
Red Hat Enterprise Linux 8libgs-develNot affected
Red Hat Enterprise Linux 7ghostscriptNot affected
Red Hat Enterprise Linux 7ghostscript-cupsNot affected
Red Hat Enterprise Linux 7ghostscript-develNot affected
Red Hat Enterprise Linux 7ghostscript-docNot affected
Red Hat Enterprise Linux 7ghostscript-gtkNot affected
Red Hat Enterprise Linux 7libgsNot affected
Red Hat Enterprise Linux 7libgs-develNot affected
Red Hat Enterprise Linux 6ghostscriptNot affected
Red Hat Enterprise Linux 6ghostscript-develNot affected
Red Hat Enterprise Linux 6ghostscript-docNot affected
Red Hat Enterprise Linux 6ghostscript-gtkNot affected
Alpine Linux 3.24ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.23ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.22ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.21ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.20ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.19ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.18ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.17ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.16ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.15ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.14ghostscriptFixed9.54-r1ALPINE-CVE-2021-3781
Alpine Linux 3.13ghostscriptFixed9.53.3-r1ALPINE-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.

Vendor advisories:

References

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.