{"id":"CVE-2020-36468","aliases":["EUVD-2021-1830","GHSA-pwhf-7427-9vv2","RUSTSEC-2020-0148"],"status":"published","title":"Non-atomic writes in cgc","description":"An issue was discovered in the cgc crate through 2020-12-10 for Rust. Ptr::write performs non-atomic write operations on an underlying pointer.","severity":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.00978,"percentile":0.62621,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-362","CWE-657"],"published":"2020-12-10T12:00:00Z","modified":"2026-06-17T03:15:33Z","affected":[{"source":"ghsa","ecosystem":"crates.io","package":"cgc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.4.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"cgc","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.4.0"}]}],"bundled":3},{"source":"osv","ecosystem":"crates.io","package":"cgc","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.4.0"}]}],"bundled":3},{"source":"osv","ecosystem":"crates.io","package":"cgc","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"0.4.0"}]}],"bundled":3},{"source":"osv","ecosystem":"crates.io","package":"cgc","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}],"bundled":3}],"products":[{"vendor":"cgc_project","product":"cgc"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0148.html","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","web","advisory"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/cgc/RUSTSEC-2020-0148.md","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-36468","tags":["advisory"]},{"url":"https://github.com/playXE/cgc/issues/5","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-pwhf-7427-9vv2"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-36467","tags":["advisory"]},{"url":"https://github.com/playXE/cgc","tags":["package"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-36466","tags":["advisory"]},{"url":"https://crates.io/crates/cgc","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2020-36468","description":"An issue was discovered in the cgc crate through 2020-12-10 for Rust. Ptr::write performs non-atomic write operations on an underlying pointer.","status":"published","published":"2021-08-08T05:12:00Z","modified":"2024-08-04T17:30:08.317Z","updated_at":"2026-11-02T14:35:55.128961Z"}],"euvd":[{"id":"EUVD-2021-1830","description":"An issue was discovered in the cgc crate through 2020-12-10 for Rust. Ptr::write performs non-atomic write operations on an underlying pointer.","status":"published","published":"2021-08-08T05:12:00Z","modified":"2024-08-04T17:30:08Z","updated_at":"2026-11-03T03:07:03.010139Z"}],"ghsa":[{"id":"GHSA-pwhf-7427-9vv2","title":"Non-atomic writes in cgc","description":"# Multiple soundness issues in `Ptr` in cgc\n\nAffected versions of this crate have the following issues:\n\n1. `Ptr` implements `Send` and `Sync` for all types, this can lead to data\n   races by sending non-thread safe types across threads.\n\n2. `Ptr::get` violates mutable alias rules by returning multiple mutable\n   references to the same object.\n\n3. `Ptr::write` uses non-atomic writes to the underlying pointer. This means\n   that when used across threads it can lead to data races.","status":"published","published":"2021-08-25T20:56:57Z","modified":"2023-06-13T16:46:49Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-657"],"updated_at":"2026-11-02T14:36:53.103029Z"}],"nvd":[{"id":"CVE-2020-36468","description":"An issue was discovered in the cgc crate through 2020-12-10 for Rust. Ptr::write performs non-atomic write operations on an underlying pointer.","status":"published","published":"2021-08-08T06:15:08.227Z","modified":"2026-06-17T03:15:33.387Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"updated_at":"2026-11-02T14:06:44.292752Z"}],"osv":[{"id":"GHSA-f3mq-99jr-ww4r","title":"Multiple soundness issues in cgc","description":"Affected versions of this crate have the following issues:\n\n1. `Ptr` implements `Send` and `Sync` for all types, this can lead to data\n   races by sending non-thread safe types across threads.\n\n2. `Ptr::get` violates mutable alias rules by returning multiple mutable\n   references to the same object.\n\n3. `Ptr::write` uses non-atomic writes to the underlying pointer. This means\n   that when used across threads it can lead to data races.\n","status":"published","published":"2021-08-25T20:56:16Z","modified":"2024-03-15T00:05:22.909466Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-657"],"updated_at":"2026-11-02T15:46:45.639885Z"},{"id":"GHSA-f9xr-3m55-5q2v","title":"Data races in cgc","description":"An issue was discovered in the cgc crate through 2020-12-10 for Rust. Ptr implements Send and Sync for all types","status":"published","published":"2021-08-25T20:56:14Z","modified":"2024-03-15T00:05:22.909466Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-362"],"updated_at":"2026-11-02T15:46:46.39441Z"},{"id":"GHSA-pwhf-7427-9vv2","title":"Non-atomic writes in cgc","description":"# Multiple soundness issues in `Ptr` in cgc\n\nAffected versions of this crate have the following issues:\n\n1. `Ptr` implements `Send` and `Sync` for all types, this can lead to data\n   races by sending non-thread safe types across threads.\n\n2. `Ptr::get` violates mutable alias rules by returning multiple mutable\n   references to the same object.\n\n3. `Ptr::write` uses non-atomic writes to the underlying pointer. This means\n   that when used across threads it can lead to data races.","status":"published","published":"2021-08-25T20:56:57Z","modified":"2024-03-15T00:05:22.909466Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-657"],"updated_at":"2026-11-02T15:46:53.700556Z"},{"id":"RUSTSEC-2020-0148","title":"Multiple soundness issues in `Ptr`","description":"Affected versions of this crate have the following issues:\n\n1. `Ptr` implements `Send` and `Sync` for all types, this can lead to data\n   races by sending non-thread safe types across threads.\n\n2. `Ptr::get` violates mutable alias rules by returning multiple mutable\n   references to the same object.\n\n3. `Ptr::write` uses non-atomic writes to the underlying pointer. This means\n   that when used across threads it can lead to data races.","status":"published","published":"2020-12-10T12:00:00Z","modified":"2024-03-15T00:05:22.909466Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T15:53:39.492624Z"}]}}
