CVE-2021-21235
Infinite loop in parsing PNG files in
Reported by github_m · Published January 6, 2021
kamadak-exif is fixed in 0.5.3 and 0.5.2 (crates.io)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kamadak-exif | crates.io | 0.5.3, 0.5.2 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| kamadak | exif-rs | = 0.5.2 |
| kamadak | exif-rs | 0.5.2 |
Timeline
- Jan 4, 2021 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Nov 21, 2024 CVE Updated
- Mar 17, 2026 Security Advisory
- Aug 26, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-21235
vulnetix vdb fixes CVE-2021-21235
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-21235/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart