CVE-2021-43113 Command injection in itext7-core

Critical 9.8 Published Updated

Attackers can execute arbitrary commands via malicious filenames in iText PDF library due to improper handling in Ghostscript integration.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-43113?

CVE-2021-43113 is a critical command injection vulnerability in Debian Debian Linux, published on 15 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

iTextPDF in iText 7 and up to (excluding 4.4.13.3) 7.1.17 allows command injection via a CompareTool filename that is mishandled on the gs (aka Ghostscript) command line in GhostscriptHelper.java.

Weakness: CWE-77

Which versions are affected by CVE-2021-43113?

4 open source packages ship an affected version, including com.itextpdf:itext7-core and com.itextpdf:itextpdf. It affects 2 products.

PackageAffectedFixed in
com.itextpdf:itext7-core MavenAll versions7.1.17
com.itextpdf:itext7-core MavenAll versions7.1.17
com.itextpdf:itextpdf MavenAll versions5.5.13.3
com.itextpdf:itextpdf MavenAll versions5.5.13.3

Products include Debian Debian Linux, Itextpdf Itext.

How do I fix CVE-2021-43113?

Upgrade com.itextpdf:itext7-core to 7.1.17 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2021-43113 being exploited?

There is no known exploitation of CVE-2021-43113 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-43113, DLA-3273-1, DSA-5323-1, GHSA-gv87-q66h-4277, UBUNTU-CVE-2021-43113, openSUSE-SU-2024:11980-1.

Is CVE-2021-43113 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free