Skip to content

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

4 participants