CVE-2021-21235 json
Infinite loop in parsing PNG files in
published 2021-01-04 5 y ago modified 2026-07-08 4 mo ago also GHSA-px9g-8hgv-jvg2 , RUSTSEC-2021-0143 , EUVD-2022-7148
- cvss
- 5.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.5%
- EPSS 1.5% chance of exploitation in 30 days, percentile 74%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io kamadak-exif 0.5.3
Exploit prediction
1.53% chance of exploitation in the next 30 days, higher than 74% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 4.3 | AV:N/AC:M/Au:N/C:N/I:N/A:P |
| GitHub | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
| OSV | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | kamadak-exif | >=0.5.2, <0.5.3 |
0.5.3 |
Affected products
- kamadak exif-rs
Classification
References
-
github.com
/kamadak/exif-rs/commit/f21df24616ea611c5d5d0e0e2f8042eb74d5ff48
web, patch, third-party-advisory
-
github.com
/kamadak/exif-rs/commit/1b05eab57e484cd7d576d4357b9cda7fdc57df8c
web
-
github.com
/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2
web, third-party-advisory
-
crates.io
/crates/kamadak-exif
web, product, third-party-advisory, package
-
nvd.nist.gov
/vuln/detail/CVE-2021-21235
advisory
-
github.com
/kamadak/exif-rs
package
-
rustsec.org
/advisories/RUSTSEC-2021-0143.html
web, advisory
Sources
- CVE List CVE-2021-21235
- GitHub Advisory GHSA-px9g-8hgv-jvg2
- NVD CVE-2021-21235
- OSV RUSTSEC-2021-0143
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.