Every CVE Search/ Get API key

CVE-2018-20991

Double free in smallvec

9.8 CriticalFix available

An issue was discovered in the smallvec crate before 0.6.3 for Rust. The Iterator implementation mishandles destructors, leading to a double free.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

1.85%Up 1.4 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 9.8

An issue was discovered in the smallvec crate before 0.6.3 for Rust. The Iterator implementation mishandles destructors, leading to a double free.

Record
CVE-2018-20991
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-415
Updated
2026-11-02
CVE List No score

An issue was discovered in the smallvec crate before 0.6.3 for Rust. The Iterator implementation mishandles destructors, leading to a double free.

Record
CVE-2018-20991
Updated
2026-11-02
EUVDEUVD-2021-1878 No score

An issue was discovered in the smallvec crate before 0.6.3 for Rust. The Iterator implementation mishandles destructors, leading to a double free.

Record
EUVD-2021-1878
Updated
2026-11-03
GitHub AdvisoriesGHSA-rxr4-x558-x7hw 9.8

Double free in smallvec

If an iterator passed to SmallVec::insert_many panicked in Iterator::next, destructors were run during unwinding while the vector was in an inconsistent state, possibly causing a double free (a destructor running on two copies of the same value).

This is fixed in smallvec 0.6.3 by ensuring that the vector's length is not updated to include moved items until they have been removed from their original positions. Items may now be leaked if Iterator::next panics, but they will not be dropped more than once.

Record
GHSA-rxr4-x558-x7hw
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-415
Updated
2026-11-02
OSV 9.8

An issue was discovered in the smallvec crate before 0.6.3 for Rust. The Iterator implementation mishandles destructors, leading to a double free.

Record
CVE-2018-20991
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-rxr4-x558-x7hw 9.8

Double free in smallvec

If an iterator passed to SmallVec::insert_many panicked in Iterator::next, destructors were run during unwinding while the vector was in an inconsistent state, possibly causing a double free (a destructor running on two copies of the same value).

This is fixed in smallvec 0.6.3 by ensuring that the vector's length is not updated to include moved items until they have been removed from their original positions. Items may now be leaked if Iterator::next panics, but they will not be dropped more than once.

Record
GHSA-rxr4-x558-x7hw
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-415
Updated
2026-11-02
OSVRUSTSEC-2018-0003 9.8

Possible double free during unwinding in SmallVec::insert_many

If an iterator passed to SmallVec::insert_many panicked in Iterator::next, destructors were run during unwinding while the vector was in an inconsistent state, possibly causing a double free (a destructor running on two copies of the same value).

This is fixed in smallvec 0.6.3 by ensuring that the vector's length is not updated to include moved items until they have been removed from their original positions. Items may now be leaked if Iterator::next panics, but they will not be dropped more than once.

Thank you to @Vurich for reporting this bug.

Record
RUSTSEC-2018-0003
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2018-20991 9.8

An issue was discovered in the smallvec crate before 0.6.3 for Rust. The Iterator implementation mishandles destructors, leading to a double free.

Record
UBUNTU-CVE-2018-20991
CVSS 3.0
9.8 CriticalCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVSUSE-SU-2021:1310-1 No score

Security update for librsvg

This update for librsvg fixes the following issues:

  • librsvg was updated to 2.42.9:
    • Update dependent crates that had security vulnerabilities: smallvec to 0.6.14 - RUSTSEC-2018-0003 - CVE-2018-20991 (bsc#1148293) -the bundled version of the cssparser crate now builds correctly on Rust 1.43 (bsc#1181571).
Record
SUSE-SU-2021:1310-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
smallvec
crates.io
0.3.2 up to 0.6.3
0.6.3
smallvec
crates.io
0.3.2 up to 0.3.4, 0.4.0-0 up to 0.4.5, 0.5.0-0 up to 0.5.1, 0.6.0-0 up to 0.6.3
0.3.40.4.50.5.10.6.3
librsvg
SUSE:Linux Enterprise Module for Package Hub 15 SP2
before 2.42.9-3.6.1
2.42.9-3.6.1
rust-smallvec
Ubuntu:20.04:LTS
All versions, plus listed versions
0.6.10-11.1.0-1
None known
rust-smallvec
Ubuntu:22.04:LTS
All versions, plus listed versions
1.4.2-21.7.0-1
None known
rust-smallvec
Ubuntu:24.04:LTS
All versions, plus listed versions
1.11.0-11.11.2-1
None known
rust-smallvec
Ubuntu:25.10
All versions, plus listed versions
1.13.2-1
None known
rust-smallvec
Ubuntu:26.10
All versions, plus listed versions
1.15.1-11.15.2-1
None known
rust-smallvec
Ubuntu:26.04:LTS
All versions, plus listed versions
1.13.2-11.15.1-1
None known

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2018-20991 is a critical vulnerability (CVSS 9.8) in Servo Smallvec, published July 19, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.85%, the 79th percentile. Fixed in smallvec 0.6.3.

References

Show 6 moreShow less
MoveEnter Open