CVE-2021-38196
JSON

9.8critical

Remote code execution in better-macro

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
2.57% (higher than 85% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-79wf-qcqv-r22rRUSTSEC-2021-0077

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
better-macro (crates.io)up to 1.0.4, from 0.0.0-0GitHub Advisory Database, RustSec Advisory Database
better-macro_project better-macroup to 2021-07-22NVD

All scores

GitHub9.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

RustSec Advisory Database

better-macro is a fake crate which is "Proving A Point" that proc-macros can run arbitrary code. This is not a particularly novel or interesting observation.

It currently opens https://github.com/raycar5/better-macro/blob/master/doc/hi.md which doesn't appear to have any malicious content, but there's no guarantee that will remain the case.

This crate has no useful functionality, and should not be used.

NVD (es)

Se ha detectado un problema en la crate better-macro versiones hasta 22-07-2021 para Rust. Demuestra intencionalmente que atacantes remotos pueden ejecutar código arbitrario por medio de proc-macros, y por lo demás no presente ningún propósito legítimo

References

Sources

SourceRecordLicence
CVE ListCVE-2021-38196 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-79wf-qcqv-r22r changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0077 changed 2026-11-29CC0-1.0
NVDCVE-2021-38196 changed 2026-06-17Public domain