What’s Vulnerable › Vulnerabilities
CVE-2021-21235: Infinite loop in parsing PNG files in
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-01-06 · updated 2026-06-17
- Weakness: CWE-400
Description
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.
Affected products
- kamadak exif-rs: 0.5.2
References
- https://crates.io/crates/kamadak-exif
- https://github.com/kamadak/exif-rs/commit/f21df24616ea611c5d5d0e0e2f8042eb74d5ff48
- https://github.com/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2
- https://crates.io/crates/kamadak-exif
- https://github.com/kamadak/exif-rs/commit/f21df24616ea611c5d5d0e0e2f8042eb74d5ff48
- https://github.com/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2
Get alerted when CVE-2021-21235 or the next vulnerability affects your stack