# CVE-2021-45720: RUSTSEC-2021-0130 - Use after free in lru crate

Source: https://junglewise.ai/threats/cve-2021-45720-use-after-free-in-lru-crate  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-12-21  
License: CC BY 4.0 with a link back

CVE-2021-45720 · Severity: low · CVSS 3.1 · Published 2021-12-21

Use after free in lru crate

Technologies: [lru (crates.io)](https://junglewise.ai/threats/technologies/lru). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2021-45720 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-45720 being exploited in the wild.

**How severe is CVE-2021-45720?** Low severity, with a CVSS score of 3.1, published 21 December 2021.

**Which products and versions are affected?** lru (crates.io) SEMVER:introduced=0,fixed=0.7.1, SEMVER:introduced=0.0.0-0,fixed=0.7.1.

**Is there a fix for CVE-2021-45720?** Yes. lru (crates.io): upgrade to 0.7.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-45720?** Check whether you run lru (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- lru (crates.io): upgrade to 0.7.1 or later

  ```sh
  cargo update -p lru
  ```


## Affected products

- lru (crates.io) SEMVER:introduced=0,fixed=0.7.1, SEMVER:introduced=0.0.0-0,fixed=0.7.1

## Identifiers

- CVE-2021-45720
- GHSA-qqmc-hwqp-8g2w
- GHSA-v362-2895-h9r2
- RUSTSEC-2021-0130

## Related threats

- [RUSTSEC-2026-0253 - Potential use-after-free due to lack of panic safety in `LruCache::pop()`](https://junglewise.ai/threats/rustsec-2026-0253-potential-use-after-free-due-to-lack-of-panic-safety-a5449451)
- [`IterMut` violates Stacked Borrows by invalidating internal pointer](https://junglewise.ai/threats/itermut-violates-stacked-borrows-by-invalidating-internal-pointer-f62410ab)
- [RUSTSEC-2026-0002 - `IterMut` violates Stacked Borrows by invalidating internal pointer](https://junglewise.ai/threats/rustsec-2026-0002-itermut-violates-stacked-borrows-by-invalidating-7a707a76)
