Newtonsoft JSON.NET Security Vulnerability Implementation

落花浮王杯 提交于 2021-02-06 10:13:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!