CVE-2021-21235
JSON

5.7medium

Infinite loop in parsing PNG files in

Severity
5.7medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.53% (higher than 75% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-px9g-8hgv-jvg2RUSTSEC-2021-0143

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

Product or packageVersionsReported by
kamadak exif-rs= 0.5.2CVE List
kamadak-exif (crates.io)from 0.5.2 before 0.5.3GitHub Advisory Database, RustSec Advisory Database
kamadak-exif_project kamadak-exif0.5.2NVD

All scores

GitHub_M5.7medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
RustSec Advisory Database6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:N/A:P

Classification

What each source says

CVE List

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.

GitHub Advisory Database
Impact

Reader::read_from_container can cause an infinite loop when a crafted PNG file is given.

Patches

Version 0.5.3 includes the fix.

Workarounds

No workaround is available. Applications that do not pass files with the PNG signature to Reader::read_from_container are not affected.

References
For more information

If you have any questions or comments about this advisory:

RustSec Advisory Database

Attacker crafted data can cause a infinite loop leading to DoS if used with untrusted data.

NVD (es)

kamadak-exif es una biblioteca de análisis exif escrita en Rust puro. En kamadak-exif versión 0.5.2, Se presenta un bucle infinito en el análisis de archivos PNG diseñados. Específicamente, la función reader::read_from_container puede causar un bucle infinito cuando se le proporciona un archivo PNG diseñado. Esto es corregido en la versión 0.5.3. Ninguna solución alternativa está disponible. Las aplicaciones que no aprueban archivos con la firma PNG a la función Reader::read_from_container no están afectadas

References

Sources

SourceRecordLicence
CVE ListCVE-2021-21235 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-px9g-8hgv-jvg2 changed 2026-07-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0143 changed 2023-11-08CC0-1.0
NVDCVE-2021-21235 changed 2026-06-17Public domain