Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require upgrade Newtonsoft.Json for high severity security issue #1566

Open
iamzhaoxu opened this issue Oct 20, 2022 · 2 comments
Open

Require upgrade Newtonsoft.Json for high severity security issue #1566

iamzhaoxu opened this issue Oct 20, 2022 · 2 comments

Comments

@iamzhaoxu
Copy link

iamzhaoxu commented Oct 20, 2022

According to the GHSA-5crp-9r3c-p9vr, the current version (9.0.1) of Newtonsoft.Json used in NJsonSchema has a high-risk vulnerability

Can we upgrade the Newtonsoft.Json in NJsonSchema to resolve the issue?

@alexeygritsenko
Copy link

hi, I think you should completely abandon Newtonsoft.Json, now it is considered old and has low performance. Instead use System.Text.Json

@matherm-aboehm
Copy link

matherm-aboehm commented May 2, 2023

Before abandon Newtonsoft.Json it would help to consolidate all references to the newest version used by all packages, which also includes NSwag.
There are environments (VSIX extension for VS2017) where you can't reference both 9.0.1 and newer versions of Newtonsoft.Json at the same time by different libraries which also do reference each other, like NSwag and NJsonSchema does.
Microsoft recommends to not use [ProvideBindingRedirection] for Newtonsoft.Json, because older versions are used by core components of Visual Studio itself. See this blog post.
If all packages would reference the same new version of Newtonsoft.Json there would be no problem in loading them from the extension folder.

There are already 2 open pull requests for this purpose:
#1531
RicoSuter/NSwag#4054

Please merge them into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants