🛡️ CVE-2021-25900 — smallvec

🔴 CVSS 9.5 — Critical ✅ No Known Exploit CWE-787 OSV
9.5
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Buffer overflow in SmallVec::insert_many

A bug in the SmallVec::insert_many method caused it to allocate a buffer that was smaller than needed. It then wrote past the end of the buffer, causing a buffer overflow and memory corruption on the heap. This bug was only triggered if the iterator passed to insert_many yielded more items than the lower bound returned from its size_hint method.

The flaw was corrected in smallvec 0.6.14 and 1.6.1, by ensuring that additional space is always reserved for each item inserted. The fix also simplified the implementation of insert_many to use less unsafe code, so it is easier to verify its correctness.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.

Weakness class

CVE-2021-25900 is classified as CWE-787: Out-of-bounds Write. Data is written past the end or before the start of a buffer, corrupting whatever is stored there.

Affected software

CVE-2021-25900 is recorded against 1 package.

  • smallvec

Timeline and source

Published on 24 May 2022 and last revised on 8 November 2023. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Web)
github.com (Package)
rustsec.org (Web)

Details

Severity CRITICAL
CVSS Score 9.5
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CWE CWE-787
Public Exploit ✅ No
Source OSV
Published 2022-05-24
Updated 2026-08-12
Modified 2023-11-08
Fix URL N/A

Affected Packages

Software From version Fixed in
smallvec

Similar Threats

Exploit Protection

Are you running smallvec?

CVE-2021-25900 carries CVSS 9.5 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2021-25900 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.