CVE-2021-22204
ExifTool Remote Code Execution Vulnerability
Check your servers for CVE-2021-22204
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-22204 affects exiftool, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Known exploited
CISA added this CVE to its list of known exploited vulnerabilities on 17 Nov 2021. US federal agencies had to act by 1 Dec 2021.
- Name
- ExifTool Remote Code Execution Vulnerability
- Required action
- Apply updates per vendor instructions.
- Ransomware
- Use in ransomware campaigns is not known
- Notes
- https://nvd.nist.gov/vuln/detail/CVE-2021-22204
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
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- changed: the damage reaches other components, such as the host of a container or other users
- Impact
- confidentiality low, integrity low, availability low: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 99.9%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 99.9% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 6 Feb 2025):
- Exploitation
- active: CISA has reliable evidence of exploitation in the wild
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-94 Improper Control of Generation of Code
Affected products
As the CNA lists them.
Is my server affected?
Find the installed version of exiftool and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i exiftool
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-22204 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-22204RHEL, Rocky, Alma, Fedora
rpm -q exiftool
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-22204Alpine
apk list --installed | grep -i exiftoolWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-22204
trivy image --scanners vuln IMAGE | grep CVE-2021-22204
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://gitlab.com/gitlab-org/cves/-/blob/master/2021/CVE-2021-22204.json gitlab.com
- DSA-4910 debian.org · vendor advisory
- FEDORA-2021-de850ed71e lists.fedoraproject.org · vendor advisory
- FEDORA-2021-e3d8833d36 lists.fedoraproject.org · vendor advisory
- FEDORA-2021-88d24aa32b lists.fedoraproject.org · vendor advisory
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-22204 cisa.gov · government resource
Other references
- https://github.com/exiftool/exiftool/commit/cf0f4e7dcd024ca99615bfd1102a841a25dde031#diff-fa0d652d10dbcd246e6b1df16c1e992931d3bb717a7e36157596b76bdadb3800 github.com
- https://hackerone.com/reports/1154542 hackerone.com
- [oss-security] 20210509 [CVE-2021-22204] ExifTool - Arbitrary code execution in the DjVu module when parsing a… openwall.com · mailing list
- [oss-security] 20210510 Re: [CVE-2021-22204] ExifTool - Arbitrary code execution in the DjVu module when parsing a… openwall.com · mailing list
- http://packetstormsecurity.com/files/162558/ExifTool-DjVu-ANT-Perl-Injection.html packetstormsecurity.com
- [debian-lts-announce] 20210516 [SECURITY] [DLA 2663-1] libimage-exiftool-perl security update lists.debian.org · mailing list
- http://packetstormsecurity.com/files/164768/GitLab-Unauthenticated-Remote-ExifTool-Command-Injection.html packetstormsecurity.com
- http://packetstormsecurity.com/files/164994/GitLab-13.10.2-Remote-Code-Execution.html packetstormsecurity.com
- http://packetstormsecurity.com/files/167038/ExifTool-12.23-Arbitrary-Code-Execution.html packetstormsecurity.com
Source: the record CVE-2021-22204 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse