CVE-2020-25016: Rgb Out Of Bounds Access Vulnerability
CRITICALCVE-2020-25016 is a CRITICAL (CVSS 9.1) out of bounds access vulnerability (CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')) affecting Rgb libraries in the crates.io ecosystem. The issue involves out of bounds access in rgb. Remediation is available by upgrading affected packages to version 0.8.20.
CVE-2020-25016 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2020-25016
To remediate this vulnerability, upgrade all affected Rgb 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 rgb to 0.8.20
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rgb
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-25016, inspect your project dependencies for Rgb:
inspect dependencies for rgb
Analyze the terminal output to locate any version of Rgb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.20), 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-843: Access of Resource Using Incompatible Type ('Type Confusion'), where the product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type. In Rgb, 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-2020-25016 Affected Rgb Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rgb
|
crates.io |
≥ 0.5.4
< 0.8.20
|
0.8.20
|
References
Frequently Asked Questions
What is CVE-2020-25016?
Which Rgb versions are affected?
What version fixes CVE-2020-25016?
Is rgb affected?
What is the CVSS score of CVE-2020-25016?
What CWE is associated with CVE-2020-25016?
How can I check crates.io dependencies for CVE-2020-25016?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g4rw-8m5q-6453",
"modified" : "2023-06-13T20:26:14Z",
"published" : "2021-08-25T20:45:12Z",
"aliases" : [ "CVE-2020-25016" ],
"summary" : "Out of bounds access in rgb",
"details" : "Affected versions of rgb crate allow viewing and modifying data of any type T wrapped in RGB<T> as bytes, and do not correctly constrain RGB<T> and other wrapper structures to the types for which it is safe to do so.\n\nSafety violation possible for a type wrapped in RGB<T> and similar wrapper structures:\n\n* If T contains padding, viewing it as bytes may lead to exposure of contents of uninitialized memory.\n* If T contains a pointer, modifying it as bytes may lead to dereferencing of arbitrary pointers.\n* Any safety and/or validity invariants for T may be violated.\n\nThe issue was resolved by requiring all types wrapped in structures provided by RGB crate to implement an unsafe marker trait.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "rgb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.5.4"
}, {
"fixed" : "0.8.20"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-25016"
}, {
"type" : "WEB",
"url" : "https://github.com/kornelski/rust-rgb/issues/35"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kornelski/rust-rgb"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2020-0029.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119", "CWE-843" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-19T21:21:37Z",
"nvd_published_at" : null
}
}