Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. better-macro
  4. ›
  5. CVE-2021-38196

CVE-2021-38196: Remote code execution in better-macro

August 25, 2021

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.

References

  • github.com/advisories/GHSA-79wf-qcqv-r22r
  • github.com/raycar5/better-macro
  • github.com/raycar5/better-macro/blob/24ff1702397b9c19bbfa4c660e2316cd77d3b900/src/lib.rs
  • nvd.nist.gov/vuln/detail/CVE-2021-38196
  • rustsec.org/advisories/RUSTSEC-2021-0077.html

Code Behaviors & Features

Detect and mitigate CVE-2021-38196 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 1.0.4

Solution

Unfortunately, there is no solution available yet.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

cargo/better-macro/CVE-2021-38196.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:22 +0000.