{"id":"CVE-2021-38196","aliases":["EUVD-2021-1616","GHSA-79wf-qcqv-r22r","RUSTSEC-2021-0077"],"status":"published","title":"Remote code execution in better-macro","description":"An issue was discovered in the better-macro crate through 2021-07-22 for Rust. It intentionally demonstrates that remote attackers can execute arbitrary code via proc-macros, and otherwise has no legitimate purpose.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.02567,"percentile":0.85271,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-78","CWE-94"],"published":"2021-07-22T12:00:00Z","modified":"2026-06-17T04:01:44Z","affected":[{"source":"ghsa","ecosystem":"crates.io","package":"better-macro","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.0.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"better-macro","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"1.0.4"}]}]},{"source":"osv","ecosystem":"crates.io","package":"better-macro","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}]}],"products":[{"vendor":"better-macro_project","product":"better-macro"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0077.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/better-macro/RUSTSEC-2021-0077.md","tags":["x_refsource_MISC","x_transferred","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-38196","tags":["advisory"]},{"url":"https://github.com/raycar5/better-macro/blob/24ff1702397b9c19bbfa4c660e2316cd77d3b900/src/lib.rs#L36-L38","tags":["web"]},{"url":"https://github.com/advisories/GHSA-79wf-qcqv-r22r"},{"url":"https://github.com/raycar5/better-macro","tags":["package"]},{"url":"https://crates.io/crates/better-macro","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-38196","description":"An issue was discovered in the better-macro crate through 2021-07-22 for Rust. It intentionally demonstrates that remote attackers can execute arbitrary code via proc-macros, and otherwise has no legitimate purpose.","status":"published","published":"2021-08-08T05:07:14Z","modified":"2024-08-04T01:37:16.252Z","updated_at":"2026-11-02T14:33:07.349244Z"}],"euvd":[{"id":"EUVD-2021-1616","description":"An issue was discovered in the better-macro crate through 2021-07-22 for Rust. It intentionally demonstrates that remote attackers can execute arbitrary code via proc-macros, and otherwise has no legitimate purpose.","status":"published","published":"2021-08-08T05:07:14Z","modified":"2024-08-04T01:37:16Z","updated_at":"2026-11-03T03:24:25.244479Z"}],"ghsa":[{"id":"GHSA-79wf-qcqv-r22r","title":"Remote code execution in better-macro","description":"An issue was discovered in the better-macro crate through 2021-07-22 for Rust. It intentionally demonstrates that remote attackers can execute arbitrary code via proc-macros, and otherwise has no legitimate purpose.","status":"published","published":"2021-08-25T20:56:00Z","modified":"2023-02-01T05:06:04Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-78","CWE-94"],"updated_at":"2026-11-02T14:36:36.66596Z"}],"nvd":[{"id":"CVE-2021-38196","description":"An issue was discovered in the better-macro crate through 2021-07-22 for Rust. It intentionally demonstrates that remote attackers can execute arbitrary code via proc-macros, and otherwise has no legitimate purpose.","status":"published","published":"2021-08-08T06:15:09.153Z","modified":"2026-06-17T04:01:44.367Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:06:56.562207Z"}],"osv":[{"id":"GHSA-79wf-qcqv-r22r","title":"Remote code execution in better-macro","description":"An issue was discovered in the better-macro crate through 2021-07-22 for Rust. It intentionally demonstrates that remote attackers can execute arbitrary code via proc-macros, and otherwise has no legitimate purpose.","status":"published","published":"2021-08-25T20:56:00Z","modified":"2023-11-08T04:06:26.28817Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-78","CWE-94"],"updated_at":"2026-11-02T15:46:41.002603Z"},{"id":"RUSTSEC-2021-0077","title":"`better-macro` has deliberate RCE to prove a point","description":"[better-macro](https://crates.io/crates/better-macro) is a fake crate which is\n\"Proving A Point\" that proc-macros can run arbitrary code. This is not a particularly\nnovel or interesting observation.\n\nIt currently opens `https://github.com/raycar5/better-macro/blob/master/doc/hi.md`\nwhich doesn't appear to have any malicious content, but there's no guarantee that\nwill remain the case.\n\nThis crate has no useful functionality, and should not be used.","status":"published","published":"2021-07-22T12:00:00Z","modified":"2023-11-08T04:06:26.28817Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
