🛡️ CVE-2021-29939 — stackvector
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
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| stackvector | — | — |
References
Similar Threats
- Unknown RUSTSEC-2025-0166
More CVE 2021 advisories
Browse all of CVE 2021 in the advisory index.
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.