CVE-2018-21000
Heap overflow or corruption in safe-transmute
An issue was discovered in the safe-transmute crate before 0.10.1 for Rust. A constructor's arguments are in the wrong order, causing heap memory corruption.
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
What each source reports
NVD Score used
9.8
An issue was discovered in the safe-transmute crate before 0.10.1 for Rust. A constructor's arguments are in the wrong order, causing heap memory corruption.
- Record
CVE-2018-21000- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-119
- Updated
- 2026-11-02
CVE List No score
An issue was discovered in the safe-transmute crate before 0.10.1 for Rust. A constructor's arguments are in the wrong order, causing heap memory corruption.
- Record
CVE-2018-21000- Updated
- 2026-11-02
EUVDEUVD-2021-1518 No score
An issue was discovered in the safe-transmute crate before 0.10.1 for Rust. A constructor's arguments are in the wrong order, causing heap memory corruption.
- Record
EUVD-2021-1518- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-2v78-j59h-fmpf
9.8
Heap overflow or corruption in safe-transmute
Affected versions of this crate switched the length and capacity arguments in the Vec::from_raw_parts() constructor, which could lead to memory corruption or data leakage.
- Record
GHSA-2v78-j59h-fmpf- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-119
- Updated
- 2026-11-02
OSV
9.8
An issue was discovered in the safe-transmute crate before 0.10.1 for Rust. A constructor's arguments are in the wrong order, causing heap memory corruption.
- Record
CVE-2018-21000- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-2v78-j59h-fmpf
9.8
Heap overflow or corruption in safe-transmute
Affected versions of this crate switched the length and capacity arguments in the Vec::from_raw_parts() constructor, which could lead to memory corruption or data leakage.
- Record
GHSA-2v78-j59h-fmpf- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-119
- Updated
- 2026-11-02
OSVRUSTSEC-2018-0013
9.8
Vec-to-vec transmutations could lead to heap overflow/corruption
Affected versions of this crate switched the length and capacity arguments in the Vec::from_raw_parts() constructor, which could lead to memory corruption or data leakage.
The flaw was corrected by using the constructor correctly.
- Record
RUSTSEC-2018-0013- CVSS 3.0
- 9.8 Critical
CVSS: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-21000
9.8
An issue was discovered in the safe-transmute crate before 0.10.1 for Rust. A constructor's arguments are in the wrong order, causing heap memory corruption.
- Record
UBUNTU-CVE-2018-21000- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
safe-transmutecrates.io |
0.4.0 up to 0.10.1 | 0.10.1 |
rust-safe-transmuteUbuntu:20.04:LTS |
All versions, plus listed versions 0.10.1-2 |
None known |
rust-safe-transmuteUbuntu:22.04:LTS |
All versions, plus listed versions 0.10.1-2 |
None known |
rust-safe-transmuteUbuntu:24.04:LTS |
All versions, plus listed versions 0.11.2-1 |
None known |
rust-safe-transmuteUbuntu:25.10 |
All versions, plus listed versions 0.11.3-1 |
None known |
rust-safe-transmuteUbuntu:26.10 |
All versions, plus listed versions 0.11.3-1 |
None known |
rust-safe-transmuteUbuntu:26.04:LTS |
All versions, plus listed versions 0.11.3-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2018-21000 is a critical vulnerability (CVSS 9.8) in Safe-transmute Project Safe-transmute, published November 27, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.98%, the 80th percentile. Fixed in safe-transmute 0.10.1.
References
rustsec.org/advisories/RUSTSEC-2018-0013.html
github.com/nabijaczleweli/safe-transmute-rs/pull/36
nvd.nist.gov/vuln/detail/CVE-2018-21000
github.com/nabijaczleweli/safe-transmute-rs/commit/a134e06d740f9d7c287f74c0af2cd06206774364
github.com/advisories/GHSA-2v78-j59h-fmpf
github.com/nabijaczleweli/safe-transmute-rs
crates.io/crates/safe-transmute
ubuntu.com/security/CVE-2018-21000
cve.org/CVERecord?id=CVE-2018-21000