{"id":"CVE-2020-25016","aliases":["CVE-2020-25016","GHSA-g4rw-8m5q-6453","RUSTSEC-2020-0029"],"related":[],"kind":"vulnerability","state":"published","title":"Out of bounds access in rgb","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Affected versions of rgb crate allow viewing and modifying data of any type `T` wrapped in `RGB<T>` as bytes,\nand 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.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó una violación de seguridad en la crate rgb versiones anteriores a 0.8.20 para Rust, conllevando a (por ejemplo) una desreferenciación de punteros arbitrarios o una divulgación de memoria no inicializada. Esto ocurre porque las estructuras pueden ser tratadas como bytes para operaciones de lectura y escritura","source":"nvd"}],"published":"2020-06-14T12:00:00.000Z","modified":"2026-06-17T03:06:14.650Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:N","score":6.4,"rating":"MEDIUM"}],"cwes":["CWE-119","CWE-843"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.5.4","status":"affected","fixed":"0.8.20"}],"ecosystem":"crates.io","package":"rgb","purl":"pkg:cargo/rgb","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.5.4","status":"affected","fixed":"0.8.20"}],"ecosystem":"crates.io","package":"rgb","purl":"pkg:cargo/rgb","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.8.20"}],"vendor":"rgb-rust_project","product":"rgb-rust","cpe":"cpe:2.3:a:rgb-rust_project:rgb-rust:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0029.html","tags":["advisory","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://github.com/kornelski/rust-rgb/issues/35","tags":["exploit","report","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-25016","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/kornelski/rust-rgb","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/rgb","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-25016","url":"https://www.cve.org/CVERecord?id=CVE-2020-25016","licence":"CVE Terms of Use","modified":"2024-08-04T15:26:09.035Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-g4rw-8m5q-6453","url":"https://github.com/advisories/GHSA-g4rw-8m5q-6453","licence":"CC-BY-4.0","modified":"2023-11-08T04:03:09.114Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2020-0029","url":"https://rustsec.org/advisories/RUSTSEC-2020-0029.html","licence":"CC0-1.0","modified":"2023-11-08T04:03:09.114Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-25016","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-25016","licence":"Public domain","modified":"2026-06-17T03:06:14.650Z"}],"updatedAt":"2026-11-25T22:57:54.418Z","epss":{"score":0.01595,"percentile":0.76111,"date":"2026-11-30T12:00:22.000Z"}}