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-2022-23935

CVE-2022-23935: ExifTool Command Injection Vulnerability

CVE-2022-23935 is a command injection flaw in ExifTool before version 12.38 that allows remote code execution through improper file handling. This article covers technical details, affected versions, and mitigation.

Published: February 17, 2026

CVE-2022-23935 Overview

CVE-2022-23935 is a command injection vulnerability discovered in ExifTool, a popular Perl library and command-line tool used for reading, writing, and editing metadata in image, audio, and video files. The vulnerability exists in lib/Image/ExifTool.pm in versions prior to 12.38, where improper handling of a filename check ($file =~ /\\|$/) allows attackers to inject and execute arbitrary system commands.

Critical Impact

Successful exploitation of this vulnerability enables attackers to execute arbitrary commands on the target system by crafting malicious filenames, potentially leading to complete system compromise.

Affected Products

  • ExifTool versions prior to 12.38
  • Applications and services that integrate ExifTool for metadata processing
  • Systems processing untrusted image files through ExifTool

Discovery Timeline

  • 2022-01-25 - CVE CVE-2022-23935 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-23935

Vulnerability Analysis

The vulnerability stems from insufficient input validation in ExifTool's file handling mechanism. When processing filenames, the application uses a regex pattern to check for pipe characters at the end of filenames ($file =~ /\\|$/). However, this check is improperly implemented, allowing attackers to bypass the security control and inject shell commands through specially crafted filenames.

ExifTool processes metadata from various file types and is commonly integrated into web applications, content management systems, and file processing pipelines. When a malicious filename containing shell metacharacters is processed, the command injection occurs during the file open operation, as Perl's two-argument open() function interprets certain characters as shell commands.

The vulnerability is classified under CWE-78 (Improper Neutralization of Special Elements used in an OS Command), indicating that user-controlled input is being passed to a system shell without adequate sanitization.

Root Cause

The root cause lies in the flawed regex pattern used to detect potentially dangerous filenames. The pattern $file =~ /\\|$/ was intended to prevent command execution by blocking filenames ending with a pipe character. However, the implementation fails to account for other shell metacharacters and injection techniques that can bypass this check, particularly when combined with specific character sequences that evade the pattern matching.

Attack Vector

Exploitation requires local access and user interaction, where an attacker must convince a user or automated system to process a maliciously crafted file. The attack vector typically involves:

  1. Crafting a filename containing embedded shell commands
  2. Delivering the malicious file to a target system
  3. Having the file processed by ExifTool (either manually by a user or automatically by an application)

When the malicious file is processed, the embedded commands execute with the privileges of the ExifTool process. This vulnerability is particularly dangerous in environments where ExifTool is used to automatically process uploaded files, such as image galleries, content management systems, or media processing pipelines.

For technical details on the exploitation mechanism, see the GitHub Gist PoC published by security researchers.

Detection Methods for CVE-2022-23935

Indicators of Compromise

  • Unusual filenames containing pipe characters (|), semicolons (;), or backticks in image directories
  • Unexpected child processes spawned by ExifTool or Perl interpreter processes
  • Command execution patterns in process monitoring logs associated with metadata extraction operations
  • Anomalous network connections or file system modifications following image file processing

Detection Strategies

  • Monitor process creation events for suspicious child processes spawned by exiftool or perl processes
  • Implement file upload filtering to detect malicious filename patterns before processing
  • Enable command-line auditing to capture full command arguments passed to ExifTool
  • Deploy endpoint detection rules to identify command injection attempts targeting metadata processing tools

Monitoring Recommendations

  • Configure logging for all ExifTool invocations, including full filename arguments
  • Implement file integrity monitoring on systems running ExifTool in automated workflows
  • Monitor for unusual process trees where perl or exiftool spawn unexpected shell commands
  • Review application logs for errors or anomalies during metadata extraction operations

How to Mitigate CVE-2022-23935

Immediate Actions Required

  • Upgrade ExifTool to version 12.38 or later immediately
  • Audit systems for ExifTool installations and verify version numbers using exiftool -ver
  • Review logs for any suspicious file processing activities that may indicate prior exploitation attempts
  • Implement input validation on filenames before passing them to ExifTool

Patch Information

The ExifTool project has released version 12.38 which addresses this command injection vulnerability. The fix involves improved handling of the filename regex check to properly sanitize potentially dangerous input. The security patch can be reviewed in the official commit on GitHub.

Organizations should upgrade to ExifTool 12.38 or later through their package manager or by downloading directly from the official ExifTool website.

Workarounds

  • Implement strict filename validation and sanitization before processing files with ExifTool
  • Run ExifTool in a sandboxed environment with restricted privileges and limited system access
  • Use ExifTool's -stay_open mode with careful input handling to reduce attack surface
  • Consider using containerized deployments to isolate ExifTool processing from the host system
bash
# Verify ExifTool version and upgrade if necessary
exiftool -ver

# On Debian/Ubuntu systems, upgrade via package manager
sudo apt update && sudo apt install libimage-exiftool-perl

# For manual installation, download latest version from official source
# and verify integrity before installation

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 Probability27.75%

  • 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
  • CWE References
  • CWE-78
  • Technical References
  • GitHub Gist PoC Code
  • Vendor Resources
  • GitHub ExifTool Commit Update
  • Related CVEs
  • CVE-2026-3102: Exiftool PNG File Parser RCE Vulnerability

  • CVE-2021-22204: Exiftool RCE Vulnerability via DjVu Files
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