The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-43113

CVE-2021-43113: iTextPDF iText RCE Vulnerability

CVE-2021-43113 is a remote code execution vulnerability in iTextPDF iText 7 through 7.1.17 that enables command injection via Ghostscript. This article covers technical details, affected versions, impact, and mitigation.

Published: February 25, 2026

CVE-2021-43113 Overview

CVE-2021-43113 is a command injection vulnerability affecting iTextPDF in iText 7 and versions up to (excluding) 5.5.13.3 and 7.1.17. The flaw exists in the GhostscriptHelper.java class where a CompareTool filename is improperly handled when constructing command line arguments for Ghostscript (gs) execution. This allows attackers to inject arbitrary operating system commands through maliciously crafted filenames.

Critical Impact

This command injection vulnerability allows remote attackers to execute arbitrary system commands on servers processing PDF files with the vulnerable iText library, potentially leading to complete system compromise.

Affected Products

  • iTextPDF iText versions prior to 5.5.13.3
  • iText 7 versions prior to 7.1.17
  • Debian Linux 10.0 and 11.0 (using vulnerable iText packages)

Discovery Timeline

  • 2021-12-15 - CVE-2021-43113 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-43113

Vulnerability Analysis

The vulnerability stems from improper input validation in the GhostscriptHelper.java class within the iTextPDF library. When the CompareTool functionality is used to compare PDF documents, filenames are passed to an external Ghostscript process without adequate sanitization. An attacker can craft a malicious filename containing shell metacharacters or command sequences that get interpreted by the operating system shell when Ghostscript is invoked.

The exploitation is network-accessible and requires no prior authentication or user interaction. Successful exploitation grants attackers the ability to execute arbitrary commands with the privileges of the application processing the PDF files, potentially resulting in complete confidentiality, integrity, and availability compromise of the affected system.

Root Cause

The root cause is classified under CWE-77 (Improper Neutralization of Special Elements used in a Command). The GhostscriptHelper.java class fails to properly sanitize or escape filename parameters before incorporating them into command-line arguments for the Ghostscript executable. This allows shell metacharacters within filenames to break out of the intended command context and execute attacker-controlled commands.

Attack Vector

The attack vector is network-based, targeting applications that use iTextPDF's CompareTool functionality. An attacker can exploit this vulnerability by:

  1. Submitting a PDF file with a specially crafted filename to an application using vulnerable iText versions
  2. The application invokes the CompareTool functionality, which internally uses GhostscriptHelper.java
  3. The malicious filename containing command injection payloads is passed unsanitized to the shell
  4. The injected commands execute with the privileges of the application process

The vulnerability is particularly dangerous in web applications and document processing services that accept user-uploaded PDF files and perform comparison operations using iText.

Detection Methods for CVE-2021-43113

Indicators of Compromise

  • Unusual process spawning from Java applications, particularly child processes of Ghostscript
  • Unexpected network connections or reverse shells originating from PDF processing services
  • Anomalous file system activity in directories used for PDF processing
  • Log entries showing malformed or suspicious filenames with shell metacharacters in PDF processing workflows

Detection Strategies

  • Monitor for command execution patterns associated with Ghostscript that include unexpected parameters or command chaining characters
  • Implement application-level logging to capture filenames processed by iText CompareTool functionality
  • Deploy runtime application security monitoring to detect command injection attempts
  • Use security scanning tools to identify vulnerable iText library versions in your software inventory

Monitoring Recommendations

  • Enable detailed logging for all PDF processing operations and review for anomalous filename patterns
  • Monitor process trees for unexpected child processes spawned from Java/JVM applications
  • Implement file integrity monitoring on systems running vulnerable iText versions
  • Set up alerts for network connections initiated by PDF processing components to unexpected destinations

How to Mitigate CVE-2021-43113

Immediate Actions Required

  • Upgrade iTextPDF to version 5.5.13.3 or later for iText 5.x installations
  • Upgrade iText 7 to version 7.1.17 or later for iText 7.x installations
  • Review and update Debian Linux systems according to Debian Security Advisory DSA-5323
  • Audit applications to identify all instances where iText CompareTool functionality is used with user-controlled input

Patch Information

iText has released patched versions that address this command injection vulnerability. Organizations should upgrade to the following minimum versions:

  • iTextPDF 5.x: Upgrade to version 5.5.13.3 or later. See the GitHub iTextPDF Release 5.5.13.3 for details.
  • iText 7.x: Upgrade to version 7.1.17 or later. See the GitHub iText7 Release 7.1.17 for details.

Debian users should apply the security updates referenced in the Debian LTS Security Announcement.

Workarounds

  • Disable or restrict access to CompareTool functionality if not required for business operations
  • Implement strict input validation on all filenames before passing them to iText library functions
  • Run PDF processing services in isolated environments with minimal privileges
  • Use application-level sandboxing to limit the impact of potential command execution
bash
# Configuration example
# Verify installed iText version in Maven projects
mvn dependency:tree | grep -i itext

# Check for vulnerable versions in Gradle projects
./gradlew dependencies | grep -i itext

# Update to patched version in pom.xml
# For iText 5.x: <version>5.5.13.3</version>
# For iText 7.x: <version>7.1.17</version>

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechItextpdf

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability2.70%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-77
  • Technical References
  • GitHub iText7 Release 7.1.17

  • GitHub iTextPDF Release 5.5.13.3

  • Debian LTS Security Announcement

  • Pastebin Security Information

  • Debian Security Advisory DSA-5323
  • Related CVEs
  • CVE-2022-24196: Itextpdf Itext DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English