CVE-2020-25016
Out of bounds access in rgb
A safety violation was discovered in the rgb crate before 0.8.20 for Rust, leading to (for example) dereferencing of arbitrary pointers or disclosure of uninitialized memory. This occurs because structs can be treated as bytes for read and write operations.
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
- None
Exploit likelihood
What each source reports
NVD Score used
9.1
A safety violation was discovered in the rgb crate before 0.8.20 for Rust, leading to (for example) dereferencing of arbitrary pointers or disclosure of uninitialized memory. This occurs because structs can be treated as bytes for read and write operations.
- Record
CVE-2020-25016- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - CVSS 2.0
- 6.4 Medium
AV:N/AC:L/Au:N/C:P/I:P/A:N - Weakness
- CWE-119, CWE-843
- Updated
- 2026-11-02
CVE List No score
A safety violation was discovered in the rgb crate before 0.8.20 for Rust, leading to (for example) dereferencing of arbitrary pointers or disclosure of uninitialized memory. This occurs because structs can be treated as bytes for read and write operations.
- Record
CVE-2020-25016- Updated
- 2026-11-02
EUVDEUVD-2021-1710 No score
A safety violation was discovered in the rgb crate before 0.8.20 for Rust, leading to (for example) dereferencing of arbitrary pointers or disclosure of uninitialized memory. This occurs because structs can be treated as bytes for read and write operations.
- Record
EUVD-2021-1710- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-g4rw-8m5q-6453
9.1
Out of bounds access in rgb
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.
Safety violation possible for a type wrapped in RGB<T> and similar wrapper structures:
- If T contains padding, viewing it as bytes may lead to exposure of contents of uninitialized memory.
- If T contains a pointer, modifying it as bytes may lead to dereferencing of arbitrary pointers.
- Any safety and/or validity invariants for T may be violated.
The issue was resolved by requiring all types wrapped in structures provided by RGB crate to implement an unsafe marker trait.
- Record
GHSA-g4rw-8m5q-6453- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-119, CWE-843
- Updated
- 2026-11-02
OSV
9.1
A safety violation was discovered in the rgb crate before 0.8.20 for Rust, leading to (for example) dereferencing of arbitrary pointers or disclosure of uninitialized memory. This occurs because structs can be treated as bytes for read and write operations.
- Record
CVE-2020-25016- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2020-25016
9.1
A safety violation was discovered in the rgb crate before 0.8.20 for Rust, leading to (for example) dereferencing of arbitrary pointers or disclosure of uninitialized memory. This occurs because structs can be treated as bytes for read and write operations.
- Record
DEBIAN-CVE-2020-25016- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
OSVGHSA-g4rw-8m5q-6453
9.1
Out of bounds access in rgb
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.
Safety violation possible for a type wrapped in RGB<T> and similar wrapper structures:
- If T contains padding, viewing it as bytes may lead to exposure of contents of uninitialized memory.
- If T contains a pointer, modifying it as bytes may lead to dereferencing of arbitrary pointers.
- Any safety and/or validity invariants for T may be violated.
The issue was resolved by requiring all types wrapped in structures provided by RGB crate to implement an unsafe marker trait.
- Record
GHSA-g4rw-8m5q-6453- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-119, CWE-843
- Updated
- 2026-11-02
OSVRUSTSEC-2020-0029
9.1
Allows viewing and modifying arbitrary structs as bytes
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.
Safety violation possible for a type wrapped in RGB<T> and similar wrapper structures:
- If
Tcontains padding, viewing it as bytes may lead to exposure of contents of uninitialized memory. - If
Tcontains a pointer, modifying it as bytes may lead to dereferencing of arbitrary pointers. - Any safety and/or validity invariants for
Tmay be violated.
The issue was resolved by requiring all types wrapped in structures provided by RGB crate to implement an unsafe marker trait.
- Record
RUSTSEC-2020-0029- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2020-25016
9.1
A safety violation was discovered in the rgb crate before 0.8.20 for Rust, leading to (for example) dereferencing of arbitrary pointers or disclosure of uninitialized memory. This occurs because structs can be treated as bytes for read and write operations.
- Record
UBUNTU-CVE-2020-25016- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
rgbcrates.io |
0.5.4 up to 0.8.20 | 0.8.20 |
rust-rgbDebian:12 |
before 0.8.36-1 | 0.8.36-1 |
rust-rgbDebian:13 |
before 0.8.36-1 | 0.8.36-1 |
rust-rgbDebian:14 |
before 0.8.36-1 | 0.8.36-1 |
rust-rgbUbuntu:20.04:LTS |
All versions, plus listed versions 0.8.11-1 |
None known |
rust-rgbUbuntu:22.04:LTS |
All versions, plus listed versions 0.8.11-1 |
None known |
rust-rgbUbuntu:24.04:LTS |
All versions, plus listed versions 0.8.36-1 |
None known |
rust-rgbUbuntu:25.10 |
All versions, plus listed versions 0.8.50-1 |
None known |
rust-rgbUbuntu:26.10 |
All versions, plus listed versions 0.8.52-10.8.53-1 |
None known |
rust-rgbUbuntu:26.04:LTS |
All versions, plus listed versions 0.8.50-10.8.52-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-2020-25016 is a critical vulnerability (CVSS 9.1) in Rgb-rust Project Rgb-rust, published June 14, 2020. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.59%, the 75th percentile. Fixed in rgb 0.8.20.
References
rustsec.org/advisories/RUSTSEC-2020-0029.html
github.com/kornelski/rust-rgb/issues/35
nvd.nist.gov/vuln/detail/CVE-2020-25016
github.com/advisories/GHSA-g4rw-8m5q-6453
security-tracker.debian.org/tracker/CVE-2020-25016
github.com/kornelski/rust-rgb
crates.io/crates/rgb
ubuntu.com/security/CVE-2020-25016
cve.org/CVERecord?id=CVE-2020-25016