CVE-2021-21235Infinite loop in parsing PNG files in
- 5.7MediumCVSS base score
- 1.5%Exploitation in 30 daysEPSS · top 25% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 15 days later
· 15 days later
Published
- 4 years later
· 4 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium5.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H |
| NVDNVD · Modified | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
- EPSS (exploitation in 30 days)
- 1.5% · top 25% of all CVEs (17 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.7.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- crates.iokamadak-exifGHSA-px9g-8hgv-jvg2 (opens in a new tab)
References
References3
- https://github.com/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://crates.io/crates/kamadak-exif (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/kamadak/exif-rs/commit/f21df24616ea611c5d5d0e0e2f8042eb74d5ff48 (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-7148 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-px9g-8hgv-jvg2 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-21235)Record last updated .