vetkit.csharp.deserialization.json-type-name-handling
Json.NET TypeNameHandling is enabled without a SerializationBinder. The JSON can then name the .NET type to create, which allows remote code execution through known gadget types when the input is untrusted.
Last updated:
Suite: Security
csharp
Json.NET TypeNameHandling is enabled without a SerializationBinder. The JSON can then name the .NET type to create, which allows remote code execution through known gadget types when the input is untrusted.
Category: SECURITY · Engine rule severity: WARNING
How to fix it
Keep TypeNameHandling.None; if polymorphism is required, set a SerializationBinder that only allows an explicit list of types.
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.