🛡️ CVE-2021-29939 — stackvector

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-787 OSV
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Out of bounds write in stackvector

StackVec::extend used the lower and upper bounds from an Iterator's size_hint to determine how many items to push into the stack based vector. If the size_hint implementation returned a lower bound that was larger than the upper bound, StackVec would write out of bounds and overwrite memory on the stack. As mentioned by the size_hint documentation, size_hint is mainly for optimization and incorrect implementations should not lead to memory safety issues.

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 low, integrity low, availability low.

Weakness class

CVE-2021-29939 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-29939 is recorded against 1 package.

  • stackvector

Timeline and source

Published on 25 August 2021 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 (Package)
rustsec.org (Web)

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
CWE CWE-787
Public Exploit ✅ No
Source OSV
Published 2021-08-25
Updated 2026-08-12
Modified 2023-11-08
Fix URL N/A

Affected Packages

Software From version Fixed in
stackvector

Similar Threats

Site Security Check

Is stackvector part of your stack?

CVE-2021-29939 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

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.