CVE-2021-21235: kamadak-exif is an exif parsing library written in pure Rust
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.
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
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.