Skip to content
Server Security Center
KEVhigh7.8

CVE-2021-22204: ExifTool Remote Code Execution

Perl Exiftool · listed in the CISA catalog of actively exploited vulnerabilities since 2021-11-17.

CVSS v3.1 (CVE record)
7.8
high
EPSS (exploit probability, 30 days)
>99.9%
among the highest 0.1% of all CVEs
Added to CISA KEV
2021-11-17
US federal due date 2021-12-01
Ubuntu priority
high

CVE-2021-22204 explained

CVE-2021-22204 is a flaw in ExifTool, starting with version 7.44, in how it handles user data in DjVu image files. Parsing a crafted image can lead to arbitrary code execution. CISA lists it as known exploited, so systems that process untrusted images with ExifTool should be patched promptly.

Impact

An attacker who gets a malicious DjVu image parsed by ExifTool can run arbitrary code with the privileges of the process doing the parsing. No privileges are needed, but a user or service must process the file. Successful exploitation fully compromises confidentiality, integrity and availability within that process's context. Services that pass uploaded or untrusted images to ExifTool face the most exposure.

Who is affected

The affected source package is libimage-exiftool-perl. Ubuntu 18.04 LTS is fixed in 10.80-1ubuntu0.1 and Ubuntu 20.04 LTS is fixed in 11.88-1ubuntu0.1, both in the standard archive. Ubuntu 16.04 LTS is end of life; its fix, 10.10-1ubuntu0.1~esm1, is available only through Ubuntu Pro (ESM). Every listed release has a fixed version.

Written with AI from the data on this page and checked against it automatically.

Official 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

CISA required action: Apply updates per vendor instructions.

CISA notes

Upstream versions (CVE record)

From the CVE record published by the vendor or CVE numbering authority.

  • ExifTool
    Affected
    • ≥ 7.44
    • < 12.24
    Fixed in
    not stated

Ubuntu and Debian releases

A server is vulnerable if it has a package built from the listed source package installed in a version lower than the fixed version for its release.

What to do

  1. Update libimage-exiftool-perl to the fixed version for your release.
  2. On Ubuntu 16.04 LTS, enable Ubuntu Pro (ESM) to get 10.10-1ubuntu0.1~esm1, or upgrade to a supported release.
  3. Restart services or long-running jobs that call ExifTool so they load the updated code.
  4. Check applications that process untrusted images, since they may bundle their own ExifTool copy.

Written with AI from the data on this page and checked against it automatically.

Check and fix on a server

Run on each Ubuntu or Debian server. Replace libimage-exiftool-perl with the source package from the table above.

1. Show installed packages built from the source package, with their versions

dpkg-query -W -f='${binary:Package} ${Version} ${source:Package}\n' | awk '$3=="libimage-exiftool-perl"'

2. Compare each installed version with the fixed version for your release from the table

I=INSTALLED_VERSION; F=FIXED_VERSION   # replace both
dpkg --compare-versions "$I" lt "$F"; case $? in 0) echo vulnerable ;; 1) echo "fixed or newer" ;; *) echo "check the versions" ;; esac

3. Install the fix

sudo apt update && sudo apt install --only-upgrade $(dpkg-query -W -f='${binary:Package} ${source:Package}\n' | awk '$2=="libimage-exiftool-perl"{print $1}')

Services keep running the old code until they are restarted – restart the affected service or check with needrestart.

Rows marked “fix via Ubuntu Pro”: these fixes are only installable with an Ubuntu Pro subscription (ESM). Attach the machine first (sudo pro attach, then sudo pro enable esm-infra esm-apps), then run the commands above.

CISA's assessment (SSVC)

Exploitation
Exploited in the wild
Automatable
No – each attack needs manual steps
Technical impact
Partial – limited control or information

Weakness: CWE-94 Improper Control of Generation of Code ('Code Injection')

Questions about CVE-2021-22204

Is this vulnerability exploited in practice?
Yes. CISA added CVE-2021-22204 to its Known Exploited Vulnerabilities catalog on 2021-11-17. The required action is to apply updates per vendor instructions.
Do I need ExifTool to be exposed to the network?
No. The attack vector is local and needs a user or process to parse a malicious image. Any workflow that runs ExifTool on untrusted files, such as image uploads, is at risk.
What should I do on Ubuntu 16.04 LTS?
Ubuntu 16.04 LTS is end of life. The fix 10.10-1ubuntu0.1~esm1 is available only with Ubuntu Pro (ESM). Otherwise, upgrade to a supported release.

Written with AI from the data on this page and checked against it automatically.

References

Data: CISA Known Exploited Vulnerabilities (public domain) · CVE Program records incl. CISA ADP enrichment · OSV.dev (CC BY 4.0) incl. Ubuntu and Debian security data · FIRST EPSS · endoflife.date. Updated automatically – facts last changed 2026-11-21. Always confirm with the vendor's or distribution's advisory before patching.