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

Serialization: Fixes default JsonSerializerSettings #3313

Merged
merged 12 commits into from
Jun 28, 2022

Conversation

ealsur
Copy link
Member

@ealsur ealsur commented Jun 28, 2022

Related to GHSA-5crp-9r3c-p9vr

Quoting:

To mitigate the issue one either need to update Newtonsoft.Json to 13.0.1 or set MaxDepth parameter in the JsonSerializerSettings.

Mirroring JamesNK/Newtonsoft.Json@b6dc05b#diff-c35f33ecfb40348a47f9e6cee6c162ef4cad59d70fb1216d62180dbe59562aa4

We are setting the MaxDepth to 64.

Because bumping the Newtonsoft.Json dependency from 10.0.2 to 13.0.1 might incur into Newtonsoft breaking changes, we opt for applying the change in the JsonSerializerSettings we create in the SDK.

Closes #3312

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub advisory I believe is wrong.

Newtonsoft actually changed the MaxDepth to 64 not 128 as a reaction of the latest vulnerability.

Please change it to 64 as well.

JamesNK/Newtonsoft.Json#2473

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ealsur ealsur merged commit cd18f1d into master Jun 28, 2022
@ealsur ealsur deleted the users/ealsur/newtonsoftfix branch June 28, 2022 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Vulnerable NewtonSoft.Json version is used
3 participants