NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🦀
🦀 crates.io
Not in CISA KEV
MEDIUM severity

CVE-2021-21235 — kamadak-exif

MEDIUMFix: kamadak/exif-rs@f21df24

CVE-2021-21235 is a medium-severity (CVSS 6.5) Uncontrolled Resource Consumption vulnerability in kamadak-exif. A fix is available for kamadak-exif — see the affected versions and patch details below.

kamadak-exif vulnerable to Infinite loop when parsing PNG files

Also known asGHSA-px9g-8hgv-jvg2RUSTSEC-2021-0143
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 2, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.5%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs75th percentile — riskier than 75% of all scored CVEsHighest risk
0.00%0.68%1.36%2.03%0.4%1.5%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
🦀kamadak-exif

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.

Description

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:

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🦀crates.iokamadak-exif≥ 0.5.2&&< 0.5.30.5.3cargo update -p kamadak-exif --precise 0.5.3

Affected Products

1 product · 1 configurations
Application
kamadak-exifkamadak-exif_project
1 version
0.5.2

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for kamadak-exif, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update kamadak-exif to 0.5.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-21235 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Frequently Asked Questions

### 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 * <https://github.com/kamadak/exif-rs/security/advisories/GHSA-px9g-8hgv-jvg2> * <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21235> ### For more information If you have any questions or comments about this advisory: * Open an issue in [github.com/kamadak/exif-rs](https://
O3 Security · Impact-Aware SCA

Is CVE-2021-21235 in your dependencies?

Find it across crates.io, including transitive dependencies.

CVE-2021-21235: kamadak-exif — Fixed in 0.5.3