cve.bz

CVE-2021-22204 ExifTool Remote Code Execution Vulnerability

7.8 highKEVExploitEPSS >99.9%Fix available

High (7.8) in Perl Exiftool. In CISA KEV since 2021-11-17. EPSS >99.9% estimated probability of exploitation activity in the next 30 days.

On this page
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

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
>99.9% (unchanged from >99.9% a week ago; >99.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA KEV
listed 2021-11-17, due 2021-12-01
CISA's assessment (SSVC)
Exploitation: active · Automatable: no · Technical impact: partial, assessed 2025-02-06. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-22204 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-22204?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-22204?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-22204 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
exiftool_project:exiftoolfrom 7.44 before 12.24
debian:debian_linux9.0
debian:debian_linux10.0
fedoraproject:fedora32
fedoraproject:fedora33
fedoraproject:fedora34

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9libimage-exiftool-perl10.40-1+deb9u1DLA-2663-1
Debian10libimage-exiftool-perl11.16-1+deb10u1DSA-4910-1
Debian12, 13, 14libimage-exiftool-perl12.16+dfsg-2DEBIAN-CVE-2021-22204
Ubuntu18.04:LTSlibimage-exiftool-perl10.80-1ubuntu0.1UBUNTU-CVE-2021-22204 USN-4987-1
Ubuntu20.04:LTSlibimage-exiftool-perl11.88-1ubuntu0.1UBUNTU-CVE-2021-22204 USN-4987-1
UbuntuPro:16.04:LTSlibimage-exiftool-perl10.10-1ubuntu0.1~esm1UBUNTU-CVE-2021-22204 USN-4987-2
SUSEPackage Hub 15 SP1, Package Hub 15 SP2perl-Image-ExifTool12.25-bp152.4.3.1openSUSE-SU-2021:0707-1
openSUSELeap 15.2perl-Image-ExifTool12.25-bp152.4.3.1openSUSE-SU-2021:0707-1
Alpinev3.13, v3.14, v3.15 and 9 moreperl-image-exiftool12.24-r0ALPINE-CVE-2021-22204

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Public exploits

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

  • Emerging Threats Open ET EXPLOIT Exiftool RCE Inbound (CVE-2021-22204) sid 2034626

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON