CVEfocus › CVE database › CVE-2021-21235

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

CVSS 5.7 MediumEPSS 1.5% (higher than 75% of CVEs)Published 2021-01-06Updated 2024-08-03Assigner: GitHub_M

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.

CWE-400

What to do

Fixed builds are available from crates.io: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
1Fix pending
3Under investigation
2Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10rust-kamadak-exifFix pendingUBUNTU-CVE-2021-21235
Ubuntu 26.04rust-kamadak-exifUnder investigationUBUNTU-CVE-2021-21235
Ubuntu 25.10rust-kamadak-exifWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-21235
Ubuntu 24.04rust-kamadak-exifUnder investigationUBUNTU-CVE-2021-21235
Ubuntu 22.04rust-kamadak-exifUnder investigationUBUNTU-CVE-2021-21235
Ubuntu 20.04rust-kamadak-exifWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-21235
crates.io librarykamadak-exifFixed0.5.3GHSA-px9g-8hgv-jvg2

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.