问题
The recently exposed security vulnerabilities regarding serialization in .NET have ambiguous recommendations. What is the correct way to securely use JSON.NET?
Detailed guidance for JSON.NET: https://www.blackhat.com/docs/us-17/thursday/us-17-Munoz-Friday-The-13th-JSON-Attacks-wp.pdf#page=5
Should TypeNameHandling.All be used or should TypeNameHandling.None be used?
General Explanation: https://www.bleepingcomputer.com/news/security/severe-deserialization-issues-also-affect-net-not-just-java/
回答1:
Well appears the answer is right in front of me in the documentation:
"Incoming types should be validated with a custom SerializationBinder when deserializing with a value other than None."
来源:https://stackoverflow.com/questions/45676566/newtonsoft-json-net-security-vulnerability-implementation