Free and open · new CVEs checked every 20 minutesStatusRSSOpen dataContact

CVE-2021-21235: kamadak-exif is an exif parsing library written in pure Rust

39
Routine
MEDIUM 5.7DOWNGRADE

CVE-2021-21235 is a medium-severity flaw (CVSS 5.7) affecting kamadak-exif. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.

kamadak-exif is an exif parsing library written in pure Rust. In kamadak-exif version 0.5.2, there is an infinite loop in parsing crafted PNG files. Specifically, reader::read_from_container can cause an infinite loop when a crafted PNG file is given. This is fixed in version 0.5.3. No workaround is available. Applications that do not pass files with the PNG signature to Reader::read_from_container are not affected.

Why this priority

  • No elevated risk signals yet

No fix is published yet: follow the downgrade or mitigation steps.

Risk facts

CVSS score5.7 (Medium)
Attack vectorNetwork (remote)
Attack complexityLow
Privileges neededLow
User interactionRequired
EPSS exploit chance1.5% (top 25%)
CISA exploited listNo
WeaknessCWE-400, CWE-835
Published2021-01-06
Last modified2026-06-17
Publisher (CNA): GitHub, Inc. · Vendor: kamadak-exif project

Share: LinkedIn · X · Reddit

Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score

Am I affected?

Timeline

kamadak-exif project kamadak-exif DOWNGRADE
Affected: 0.5.2
Fixed in: no fixed release known
Safe to downgrade to: a release before 0.5.2
1. Check installed version
apt-cache policy kamadak-exif || rpm -q kamadak-exif || kamadak-exif --version
2. No fixed release: DOWNGRADE to a release before 0.5.2 (Debian / Ubuntu)
apt-cache madison kamadak-exif sudo apt install kamadak-exif=<VERSION_BEFORE_0.5.2> sudo apt-mark hold kamadak-exif
2. No fixed release: DOWNGRADE (RHEL / Amazon Linux / Fedora)
dnf --showduplicates list kamadak-exif sudo dnf downgrade kamadak-exif-<VERSION_BEFORE_0.5.2> sudo dnf versionlock add kamadak-exif
Downgrade risk
Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Restart the service, and keep the package held until a fixed release ships.
Verify at the official source NVD · CVE Program · Report a problem with this page
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.

Quick answers

How do I fix CVE-2021-21235?

kamadak-exif: downgrade or apply the listed mitigation. Exact commands for each OS are on this page.

Is CVE-2021-21235 being exploited?

CVE-2021-21235 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.

What does CVE-2021-21235 affect?

CVE-2021-21235 affects kamadak-exif. Severity is medium (CVSS 5.7). kamadak-exif is an exif parsing library written in pure Rust. In kamadak-exif version 0.5.2, there is an infinite loop in parsing crafted PNG files. Specifically, reader::read_from_container can cause an infinite loop when a crafted PNG fil

How urgent is CVE-2021-21235?

Priority 39/100. No elevated risk signals yet.

References

← Back to latest CVEs

Get the weekly exploited-CVE digest by emailThe CVEs being attacked this week and how to fix them. No spam, unsubscribe any time.