CVE-2021-21235

CVE-2021-21235 is a medium-severity vulnerability in Kamadak-exif Project Kamadak-exif with a CVSS 3.x base score of 5.7. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-835.

Key facts

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.

Frequently asked questions

What is CVE-2021-21235?
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.
How severe is CVE-2021-21235?
CVE-2021-21235 has a CVSS 3.x base score of 5.7, rated medium severity. It is exploitable over network with low attack complexity, requires low privileges and user interaction. Impact on confidentiality is none, integrity none, and availability high.
Is CVE-2021-21235 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 2% (71st percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2021-21235?
CVE-2021-21235 affects Kamadak-exif Project Kamadak-exif. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2021-21235?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
When was CVE-2021-21235 published?
CVE-2021-21235 was published on 2021-01-06 and last updated on 2026-06-17.

References

Affected products (1)

Other CWE-835 (Loop with Unreachable Exit Condition (Infinite Loop)) vulnerabilities

Browse all CWE-835 (Loop with Unreachable Exit Condition (Infinite Loop)) vulnerabilities →