CVE-2021-45720 json
Use after free in lru crate
published 2021-12-21 4 y ago modified 2026-06-17 4 mo ago also GHSA-qqmc-hwqp-8g2w , GHSA-v362-2895-h9r2 , RUSTSEC-2021-0130 , EUVD-2022-0695
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 68%
- public exploits
- 0
- none known
Summary
An issue was discovered in the lru crate before 0.7.1 for Rust. The iterators have a use-after-free, as demonstrated by an access after a pop operation.
Patch / fix
- crates.io lru 0.7.1
- lru_project lru 0.7.1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-45720 updated cvss 7.5
lru: Use after free in lru crate
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.22% chance of exploitation in the next 30 days, higher than 68% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- rustsec.org https://rustsec.org/advisories/RUSTSEC-2021-0130.html referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | lru | <0.7.1 >=0.0.0-0, <0.7.1 |
0.7.1 |
Classification
- Weakness
-
- CWE-416 Use After Free
References
-
rustsec.org
/advisories/RUSTSEC-2021-0130.html
web, exploit, issue-tracking, third-party-advisory, advisory
-
raw.githubusercontent.com
/rustsec/advisory-db/main/crates/lru/RUSTSEC-2021-0130.md
web, third-party-advisory
-
github.com
/jeromefroe/lru-rs/issues/120
web, report
-
github.com
/jeromefroe/lru-rs
package
-
nvd.nist.gov
/vuln/detail/CVE-2021-45720
advisory
-
github.com
/jeromefroe/lru-rs.git
package
-
crates.io
/crates/lru
package
Sources
- CVE List CVE-2021-45720
- GitHub Advisory GHSA-qqmc-hwqp-8g2w
- GitHub Advisory GHSA-v362-2895-h9r2
- NVD CVE-2021-45720
- OSV RUSTSEC-2021-0130
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.