Security mailing lists by PureSourceCode

CVE-2021-21235

MEDIUM 6.5CVSS 3.1

kamadak-exif vulnerable to Infinite loop when parsing PNG files

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.

Published
6 Jan 2021
Last modified
8 Jul 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-400CWE-835
Also known as
GHSA-px9g-8hgv-jvg2RUSTSEC-2021-0143
Sources
NVDJSONOSV GHSA-px9g-8hgv-jvg2JSONOSV RUSTSEC-2021-0143JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 MEDIUM 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
OSV GitHub CVSS 3.1 MEDIUM 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
OSV RustSec CVSS 3.1 MEDIUM 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD security-advisories@github.com (Secondary) CVSS 3.1 MEDIUM 5.7 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H
NVD nvd@nist.gov (Primary) CVSS 2.0 MEDIUM 4.3 AV:N/AC:M/Au:N/C:N/I:N/A:P

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD kamadak-exif_project kamadak-exif
cpe:2.3:a:kamadak-exif_project:kamadak-exif:0.5.2:*:*:*:*:rust:*:*
= 0.5.2
OSV crates.io kamadak-exif >= 0.5.2, < 0.5.3 0.5.3

References

History

  • 25 Nov 2026 20:32 UTC · NVD: first stored (published 6 Jan 2021)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 4 Jan 2021)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 6 Oct 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.