CVE-2018-20995: Slice deque Memory Corruption Slice-deque Vulnerability
CRITICALCVE-2018-20995 is a CRITICAL (CVSS 9.8) memory corruption slice-deque vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Slice deque libraries in the crates.io ecosystem. The issue involves memory corruption slice-deque. Remediation is available by upgrading affected packages to version 0.1.16.
CVE-2018-20995 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2018-20995
To remediate this vulnerability, upgrade all affected Slice deque dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade slice-deque to 0.1.16
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for slice-deque
How to Check if You Are Affected
To determine whether your application is affected by CVE-2018-20995, inspect your project dependencies for Slice deque:
inspect dependencies for slice-deque
Analyze the terminal output to locate any version of Slice deque in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.16), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Slice deque, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2018-20995 Affected Slice deque Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
slice-deque
|
crates.io |
< 0.1.16
|
0.1.16
|
References
Frequently Asked Questions
What is CVE-2018-20995?
Which Slice deque versions are affected?
What version fixes CVE-2018-20995?
Is slice-deque affected?
What is the CVSS score of CVE-2018-20995?
What CWE is associated with CVE-2018-20995?
How can I check crates.io dependencies for CVE-2018-20995?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hr3c-6mmp-6m39",
"modified" : "2023-06-13T20:55:45Z",
"published" : "2021-08-25T20:42:57Z",
"aliases" : [ "CVE-2018-20995" ],
"summary" : "Memory corruption slice-deque",
"details" : "Affected versions of this crate did not properly update the head and tail of the deque when inserting and removing elements from the front if, before insertion or removal, the tail of the deque was in the mirrored memory region, and if, after insertion or removal, the head of the deque is exactly at the beginning of the mirrored memory region.\n\nAn attacker that controls both element insertion and removal into the deque could put it in a corrupted state. Once the deque enters such an state, its head and tail are corrupted, but in bounds of the allocated memory. This can result in partial reads and writes, reads of uninitialized memory, reads of memory containing previously dropped objects, etc. An attacker could exploit this to alter program execution.\n\nThe flaw was corrected by properly updating the head and tail of the deque in this case.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "slice-deque"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.16"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-20995"
}, {
"type" : "WEB",
"url" : "https://github.com/gnzlbg/slice_deque/issues/57"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gnzlbg/slice_deque"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2018-0008.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-19T21:25:30Z",
"nvd_published_at" : null
}
}