vetkit.csharp.deserialization.javascript-serializer-type-resolver
JavaScriptSerializer is created with SimpleTypeResolver, which lets the JSON choose the .NET type to instantiate. Untrusted input leads to remote code execution.
Last updated:
Suite: Security
csharp
JavaScriptSerializer is created with SimpleTypeResolver, which lets the JSON choose the .NET type to instantiate. Untrusted input leads to remote code execution.
Category: SECURITY · Engine rule severity: ERROR
How to fix it
Construct JavaScriptSerializer without a type resolver, or move to System.Text.Json.
Rule pattern example
The engine’s matching pattern, not a confirmed exploit. Metavariables and ellipses describe matching syntax.
new JavaScriptSerializer(new SimpleTypeResolver())References
Source: packages/engine/rules/sast/csharp.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.