Code injection in RazorEngine
Published 7 Mar 2022 · Updated 26 Mar 2025
Is your project on an affected RazorEngine?
Look after several .NET apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <=4.5.1-alpha001
- Fixed in
- No fix released
Details
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.
Is GHSA-ph3v-2hq5-5qfq in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected RazorEngine, and gives you the command that fixes it.
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.