Vulnerability · Published Jan 6, 2021 · Assigned by GitHub_M

CVE-2021-21235Infinite loop in parsing PNG files in

Medium 5.7

In plain English

A medium-severity uncontrolled resource consumption in exif-rs from kamadak. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 75% of all known vulnerabilities).

Severity (CVSS 3.1)5.7Medium
Exploit odds (30 days)1.5%top 25.1% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Ubuntu:22.04:LTSrust-kamadak-exifno fix listedUBUNTU-CVE-2021-21235
Ubuntu:24.04:LTSrust-kamadak-exifno fix listedUBUNTU-CVE-2021-21235
Ubuntu:25.10rust-kamadak-exifno fix listedUBUNTU-CVE-2021-21235
Ubuntu:26.04:LTSrust-kamadak-exifno fix listedUBUNTU-CVE-2021-21235
Ubuntu:26.10rust-kamadak-exifno fix listedUBUNTU-CVE-2021-21235

Affected products (as reported)

VendorProductVersions
kamadak exif-rs = 0.5.2

Weakness: CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H

References