banner logoJoin us at RSAC™ 2026 Conference, March 23–March 26 | North Expo, Booth N-5863Join us at RSAC™ 2026, March 23–March 26Learn More
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI Security Portfolio
      Leading the Way in AI-Powered Security Solutions
    • 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
    • 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
      Digital Forensics, IRR & Breach Readiness
    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
    • 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-22204

CVE-2021-22204: Exiftool RCE Vulnerability via DjVu Files

CVE-2021-22204 is a remote code execution vulnerability in Exiftool that allows attackers to execute arbitrary code through malicious DjVu files. This article covers the technical details, affected versions, and steps to mitigate.

Published: March 4, 2026

CVE-2021-22204 Overview

CVE-2021-22204 is an arbitrary code execution vulnerability in ExifTool, a widely-used Perl library and command-line tool for reading, writing, and editing metadata in image files. The vulnerability exists due to improper neutralization of user data when parsing the DjVu file format. An attacker can craft a malicious image file that, when processed by ExifTool versions 7.44 and later, executes arbitrary code on the target system.

This vulnerability is particularly dangerous because ExifTool is commonly integrated into web applications, content management systems, and file processing pipelines. The flaw was notably exploited in attacks against GitLab instances, where uploaded images are automatically processed by ExifTool for metadata extraction.

Critical Impact

This vulnerability is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog and has been actively exploited in the wild, including in attacks against GitLab servers. The exploit enables remote code execution through a seemingly innocuous image file upload.

Affected Products

  • ExifTool versions 7.44 and up (prior to the patch)
  • Debian Linux 9.0 and 10.0
  • Fedora 32, 33, and 34

Discovery Timeline

  • April 23, 2021 - CVE-2021-22204 published to NVD
  • November 3, 2025 - Last updated in NVD database

Technical Details for CVE-2021-22204

Vulnerability Analysis

This vulnerability falls under CWE-94 (Improper Control of Generation of Code, also known as Code Injection). The flaw resides in ExifTool's handling of the DjVu file format, specifically in how ANT (annotation) data is parsed and evaluated.

ExifTool uses Perl's eval function to process certain metadata fields within DjVu files. When a malicious DjVu file contains specially crafted annotation data, the vulnerable parsing logic fails to properly sanitize user-controlled input before passing it to eval. This allows an attacker to inject arbitrary Perl code that executes with the privileges of the user running ExifTool.

The attack requires local access in that a user must open or process a malicious file. However, in many deployment scenarios—such as web applications that automatically extract metadata from uploaded images—the attack effectively becomes remotely exploitable. GitLab's integration of ExifTool for image processing made it a high-profile target for this vulnerability.

Root Cause

The root cause is insufficient input validation and sanitization in the DjVu file format parser. The ExifTool code processes ANT (annotation) chunks from DjVu files and evaluates portions of this data using Perl's eval construct. The parser did not adequately neutralize or escape special characters and code constructs that could be interpreted as executable Perl code.

When parsing DjVu annotation data, the vulnerable code path allows attackers to break out of the expected data context and inject arbitrary Perl statements. Since Perl's eval executes the string as code, any injected commands run with the full privileges of the ExifTool process.

Attack Vector

The attack vector requires a victim to process a malicious DjVu file with ExifTool. In practice, this can occur through multiple scenarios:

  1. Web Application Upload: Applications using ExifTool to extract metadata from user-uploaded images automatically trigger the vulnerability when processing a malicious file
  2. Manual Processing: A user running ExifTool directly on a downloaded or received malicious image
  3. Automated Pipelines: CI/CD systems, backup tools, or media management systems that process images using ExifTool

The malicious payload is embedded within the DjVu file's ANT annotation chunk. When ExifTool parses this data, the injected Perl code executes, enabling the attacker to run system commands, download additional payloads, establish reverse shells, or perform other malicious actions.

For detailed technical analysis of the exploitation mechanism, refer to the HackerOne Report #1154542 and the Packet Storm Perl Injection advisory.

Detection Methods for CVE-2021-22204

Indicators of Compromise

  • Presence of DjVu files with unusually large or suspicious ANT annotation chunks on systems
  • Unexpected Perl process execution originating from ExifTool or related image processing services
  • Network connections or reverse shell activity initiated by processes associated with image metadata extraction
  • Web server logs showing uploads of .djvu files followed by anomalous system behavior

Detection Strategies

  • Monitor process execution chains for Perl interpreter spawning from web application contexts or ExifTool processes
  • Implement file integrity monitoring on ExifTool installations to detect unauthorized modifications
  • Deploy network detection rules to identify command-and-control traffic patterns following image upload events
  • Use endpoint detection to flag suspicious system calls originating from metadata extraction tools

Monitoring Recommendations

  • Enable verbose logging for ExifTool operations and monitor for parsing errors or unusual metadata fields
  • Configure SIEM rules to correlate image upload events with subsequent suspicious process creation or network activity
  • Implement application-layer firewall rules to inspect uploaded files for DjVu format with malicious annotation patterns
  • Review and monitor ExifTool version across all systems using software inventory tools

How to Mitigate CVE-2021-22204

Immediate Actions Required

  • Update ExifTool to the latest patched version immediately across all systems and applications
  • Audit all applications and services that integrate ExifTool for metadata extraction
  • Temporarily disable DjVu file processing if patching cannot be performed immediately
  • Implement file type validation to restrict uploads to known-safe formats where possible

Patch Information

The ExifTool project has released a security patch to address this vulnerability. The fix modifies how the DjVu parser handles annotation data, preventing code injection through the eval construct.

Review the official patch at the GitHub ExifTool Commit for technical details on the fix.

For Linux distributions:

  • Debian users should refer to DSA-4910 and the Debian LTS Announcement
  • Fedora users can obtain patches through the standard package update mechanism via Fedora Package Announcements

Workarounds

  • Block or quarantine DjVu file uploads at the web application firewall or file upload handler level
  • Run ExifTool in a sandboxed environment with restricted system access and network connectivity
  • Implement strict input validation to reject files with suspicious or malformed metadata structures
  • Consider using alternative metadata extraction tools that do not process DjVu format until patching is complete
bash
# Verify ExifTool version and check for vulnerable installations
exiftool -ver

# Update ExifTool on Debian/Ubuntu systems
sudo apt-get update && sudo apt-get install libimage-exiftool-perl

# Update ExifTool on Fedora systems
sudo dnf update perl-Image-ExifTool

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechExiftool

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability92.76%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CISA KEV Information
  • In CISA KEVYes
  • CWE References
  • CWE-94
  • Technical References
  • Packet Storm Perl Injection

  • Packet Storm GitLab Command Injection

  • Packet Storm GitLab RCE

  • Packet Storm ExifTool Code Execution

  • Openwall OSS-Security Discussion

  • Openwall OSS-Security Discussion

  • GitLab CVE-2021-22204 JSON

  • HackerOne Report #1154542

  • Debian LTS Announce May 2021

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Debian Security DSA-4910

  • CISA Known Exploited Vulnerabilities
  • Vendor Resources
  • GitHub ExifTool Commit
  • Related CVEs
  • CVE-2026-3102: Exiftool PNG File Parser RCE Vulnerability

  • CVE-2022-23935: ExifTool Command Injection Vulnerability
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
  • English
  • 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