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).
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu:22.04:LTS | rust-kamadak-exif | no fix listed | UBUNTU-CVE-2021-21235 |
| Ubuntu:24.04:LTS | rust-kamadak-exif | no fix listed | UBUNTU-CVE-2021-21235 |
| Ubuntu:25.10 | rust-kamadak-exif | no fix listed | UBUNTU-CVE-2021-21235 |
| Ubuntu:26.04:LTS | rust-kamadak-exif | no fix listed | UBUNTU-CVE-2021-21235 |
| Ubuntu:26.10 | rust-kamadak-exif | no fix listed | UBUNTU-CVE-2021-21235 |
Affected products (as reported)
Weakness: CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H
References
- https://github.com/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2 x_refsource_CONFIRM
- https://crates.io/crates/kamadak-exif x_refsource_MISC
- https://github.com/kamadak/exif-rs/commit/f21df24616ea611c5d5d0e0e2f8042eb74d5ff48 x_refsource_MISC