ExifTool Remote Code Execution Vulnerability (CVE-2021-22204)
Published In CISA KEV since Sources: Debian, CVE.org
What is affected, what to do
Improper neutralization of user data in the DjVu file format in ExifTool versions 7.44 and up allows arbitrary code execution when parsing the malicious image
The vulnerability is being actively exploited; treat it as a priority. Update exiftool to version 12.24. Immediate actions, mitigation and detection rules are in the runbook below.
- Affected
- ExifTool
gte 7.44, <12.24..*
- ExifTool
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
7.8
Priority
XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.
Source: NVD, CVSS v3
6.8
CVSS v3
Severity Medium on the scale from 0 to 10.
Source: Debian, CVE.org
99.98 %
EPSS score
High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
Source: FIRST EPSS, percentile 99.98
Show all metrics
- Severity
- Critical
Priority (0–325)
The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?
Read in glossary- 213.97 Methodology
Exploit maturity
An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.
Read in glossary- actively exploited
XIEM Effective CVSS
XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.
Read in glossary- 7.8 Methodology
CVSS v3
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 6.8
EPSS score
The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.
Read in glossary- 99.98 %
- High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
EPSS percentile
The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.
Read in glossary- 99.98
- Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
KEV status
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- Actively exploited
- Published
In CISA KEV since
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- CISA assessment (SSVC)
- Exploitation: active · not automatable · Technical impact: partial
- Source: CISA Vulnrichment, as of 6 February 2025
CWE
CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.
Read in glossary- CWE-94
Response and mitigation
Why act now?
Prioritisation rationale
This CVE sits on KEV because ExifTool runs silently inside countless server-side workflows — a single uploaded crafted image, with no interaction on the target, is enough to achieve code execution as the processing service account, turning the nominal "Local" CVSS vector into a remotely reachable pre-auth RCE in practice (as the 2021 GitLab exploitation wave showed). Exploitation likelihood ranks among the very highest in the entire KEV catalogue, public PoC code has been circulating for years and is actively used in opportunistic mass scanning of upload endpoints. Treat as SEV-1 for any organisation operating internet-facing upload functionality, CMS, ticketing or mail gateways; SEV-2 only when ExifTool is confined to internal forensic or back-office use against trusted input.
Runbook step 1
Immediate response (0-24 h)
- Upgrade ExifTool to 12.24 or later — on Debian via
apt-get install --only-upgrade libimage-exiftool-perl, on Fedora viadnf upgrade perl-Image-ExifTool, otherwise pull the current tarball from exiftool.org. All releases from 7.44 up to and including 12.23 are vulnerable. - Inventory every system that invokes ExifTool: mail gateways with attachment scanning, CMS/DAM platforms (WordPress, Nextcloud, GitLab, Shopware), photo and media libraries, CI pipelines, forensic workstations. Pay particular attention to GitLab instances before 13.10.3/13.11.3/13.12.1, which called ExifTool server-side on avatar uploads.
- Temporarily disable image upload and processing pipelines, or restrict them to a tight allowlist (JPEG, PNG). Reject DjVu (
.djvu,.djv) as well as containers capable of carrying DjVu streams at the ingress layer. - For internet-facing services that call ExifTool in the request path, deploy a reverse-proxy or WAF rule that drops uploads carrying the DjVu magic bytes
AT&TFORM. - Move any process that invokes ExifTool to an unprivileged service account and, where feasible, into a sandbox (systemd
DynamicUser=yes,NoNewPrivileges=yes, seccomp, bubblewrap).
- Upgrade ExifTool to 12.24 or later — on Debian via
Runbook step 2
Mitigation layers
- Network: push upload-processing workers into a dedicated VLAN with no direct internet egress; constrain outbound connections to an allowlist (object store, log backend) to break reverse-shell and second-stage download attempts.
- Configuration: wrap ExifTool invocations so they only accept a positive file-type allowlist and refuse DjVu outright via
--ext djvu --ext djv; call with-fast2to limit parsers reached. - Endpoint hardening: ship an AppArmor or SELinux profile for
/usr/bin/exiftoolthat denies writes outside a scratch directory and blocksexecveof/bin/sh,/usr/bin/perl -eand network syscalls. - IAM: service accounts running ExifTool must not see secrets, database credentials or deploy keys in their process environment; move to short-lived, token-based credentials.
- WAF/IPS: Suricata/Snort rule matching HTTP uploads whose body contains the DjVu magic
\x41\x54\x26\x54\x46\x4F\x52\x4D("AT&TFORM") on URLs not part of a legitimate business workflow. - Build and CI pipelines: run ExifTool steps in containers with
read_onlyrootfs and no Docker socket mount; where DjVu support is not needed, migrate image-processing stages to non-Perl alternatives such as libvips or ImageMagick with coders disabled.
Runbook step 3
Detection rules
- Process ancestry: ExifTool (
exiftool,perl .../exiftool) spawningsh,bash,curl,wget,python,nc, or a binary under/tmp/. Sigma shape:parent_image|endswith: 'exiftool'+image|re: '(sh|bash|curl|wget|nc|python)$'. - Linux auditd:
execvesyscalls withcomm=exiftoolandargvcontaining shell metacharacters ($(,`,|,;). Rule:type=EXECVE comm="exiftool" a*=~"[\\$\\|;]"`. - Web-server access logs: POST/PUT requests with
Content-Type: image/vnd.djvuor filenames*.djvu/*.djvhitting endpoints that normally only accept JPEG/PNG (avatar upload, attachment endpoint). - Zeek
files.log:mime_type == "image/vnd.djvu"on HTTP uploads toward internal processing hosts; alternatively afile_magicmatch onAT&TFORM. - EDR/Sysmon on Windows deployments shipping
exiftool.exe: EID 1 (Process Create) withParentImageending inexiftool.exeandImageofcmd.exe,powershell.exeorrundll32.exe.
- Process ancestry: ExifTool (
Detection rules
No NEOSEC detection rule is available for this vulnerability yet.
Classification under NIS2 and CRA
Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.
NIS2
NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.
Read in glossary- Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
CRA
The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.
Read in glossary- Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
ISO/IEC 27001
ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.
Read in glossary- Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.
Description
Improper neutralization of user data in the DjVu file format in ExifTool versions 7.44 and up allows arbitrary code execution when parsing the malicious image
Source: Debian Security Advisories, NVD (NIST), cvelistv5, CISA KEV Catalog
Affected products
The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.
| Affected versions | Fixed in | ||
|---|---|---|---|
| ExifTool | ExifTool |
|
|
| exiftool_project | exiftool |
|
|
Vendors and products
Affected operating systems
| Linux | debian | debian_linux | 10.0 |
| Linux | debian | debian_linux | 9.0 |
| Linux | debian | libimage-exiftool-perl | buster |
| Other | fedoraproject | fedora | 32 |
| Other | fedoraproject | fedora | 33 |
| Other | fedoraproject | fedora | 34 |
Weakness classes (CWE)
CWE-94Improper Control of Generation of Code ('Code Injection')
Base
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Entry at MITRE CWE-94
Public exploit references
Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.
| CISA KEV Catalog | CISA Known Exploited Vulnerability (opens in a new tab)cisa.gov | actively exploited | |
| Reference tagged as exploit | hackerone.com (opens in a new tab) | PoC (publicly reported)reported, not verified | — |
| Packet Storm | ExifTool DjVu ANT Perl Injection (opens in a new tab)packetstormsecurity.com | PoC (publicly reported)reported, not verified | — |
| Packet Storm | GitLab Unauthenticated Remote ExifTool Command Injection (opens in a new tab)packetstormsecurity.com | PoC (publicly reported)reported, not verified | — |
| Packet Storm | GitLab 13.10.2 Remote Code Execution (opens in a new tab)packetstormsecurity.com | PoC (publicly reported)reported, not verified | — |
| Packet Storm | ExifTool 12.23 Arbitrary Code Execution (opens in a new tab)packetstormsecurity.com | PoC (publicly reported)reported, not verified | — |
| PoC-in-GitHub (nomi-sec) | exiftool-7.44-12.23-exploit-CVE-2021-22204- (opens in a new tab)github.com | PoC (publicly reported)reported, not verified | |
| PoC-in-GitHub (nomi-sec) | CVE-2021-22204 (opens in a new tab)github.com | PoC (publicly reported)reported, not verified |
References & sources
- github.comexiftool/exiftool/commit/cf0f4e7dcd024ca99615bfd1102a841a25dde0…x_refsource_MISC, Patch
- hackerone.comreports/1154542x_refsource_MISC, Exploit, Issue tracking, Third-party advisory
- gitlab.comgitlab-org/cves/-/blob/master/2021/CVE-2021-22204.jsonx_refsource_CONFIRM, Third-party advisory
- debian.orgDSA-4910Vendor advisory, x_refsource_DEBIAN, Mailing list, Third-party advisory
- lists.fedoraproject.orgFEDORA-2021-de850ed71eVendor advisory, x_refsource_FEDORA, Release notes
- lists.fedoraproject.orgFEDORA-2021-e3d8833d36Vendor advisory, x_refsource_FEDORA, Release notes
- lists.fedoraproject.orgFEDORA-2021-88d24aa32bVendor advisory, x_refsource_FEDORA, Release notes
- openwall.com[oss-security] 20210509 [CVE-2021-22204] ExifTool - Arbitrary code execution in the DjVu module when parsing a malicious imageMailing list, x_refsource_MLIST, Mailing list, Third-party advisory
- openwall.com[oss-security] 20210510 Re: [CVE-2021-22204] ExifTool - Arbitrary code execution in the DjVu module when parsing a malicious imageMailing list, x_refsource_MLIST, Mailing list, Third-party advisory
- packetstormsecurity.comfiles/162558/ExifTool-DjVu-ANT-Perl-Injection.htmlx_refsource_MISC, Exploit, Third-party advisory, Vulnerability database
- lists.debian.org[debian-lts-announce] 20210516 [SECURITY] [DLA 2663-1] libimage-exiftool-perl security updateMailing list, x_refsource_MLIST, Mailing list, Third-party advisory
- packetstormsecurity.comfiles/164768/GitLab-Unauthenticated-Remote-ExifTool-Command-Inj…x_refsource_MISC, Exploit, Third-party advisory, Vulnerability database
- packetstormsecurity.comfiles/164994/GitLab-13.10.2-Remote-Code-Execution.htmlx_refsource_MISC, Exploit, Third-party advisory, Vulnerability database
- packetstormsecurity.comfiles/167038/ExifTool-12.23-Arbitrary-Code-Execution.htmlx_refsource_MISC, Exploit, Third-party advisory, Vulnerability database
- cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2021-22204government-resource, US government resource
Embed badge
Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.
<a href="https://intel.neosec.eu/en/cve/CVE-2021-22204"><img src="https://intel.neosec.eu/badge/cve/CVE-2021-22204.svg?lang=en" alt="CVE-2021-22204 – NEOSEC Intel" height="20"></a>