CVE-2021-38196 json
Remote code execution in better-macro
published 2021-07-22 5 y ago modified 2026-06-17 4 mo ago also GHSA-79wf-qcqv-r22r , RUSTSEC-2021-0077 , EUVD-2021-1616
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.6%
- EPSS 2.6% chance of exploitation in 30 days, percentile 85%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
Exploit prediction
2.57% chance of exploitation in the next 30 days, higher than 85% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- rustsec.org https://rustsec.org/advisories/RUSTSEC-2021-0077.html referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | better-macro | <=1.0.4 >=0.0.0-0 |
no fix listed |
Classification
References
-
rustsec.org
/advisories/RUSTSEC-2021-0077.html
web, exploit, issue-tracking, patch, third-party-advisory, advisory
-
raw.githubusercontent.com
/rustsec/advisory-db/main/crates/better-macro/RUSTSEC-2021-0077.md
third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-38196
advisory
-
github.com
/raycar5/better-macro
package
-
github.com
/raycar5/better-macro/blob/24ff1702397b9c19bbfa4c660e2316cd77d3b900/src/lib.rs#L36-L38
web
-
crates.io
/crates/better-macro
package
Sources
- CVE List CVE-2021-38196
- GitHub Advisory GHSA-79wf-qcqv-r22r
- NVD CVE-2021-38196
- OSV RUSTSEC-2021-0077
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.