Skip to content

Fix Security Issue: Implement JSON Deserialization Depth Limit (CVE-2024-21907) #65

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yuseok-kim-edushare
Copy link

@yuseok-kim-edushare yuseok-kim-edushare commented Feb 14, 2025

This PR created to Close #64


Summary

This PR addresses a high-severity security vulnerability (CVE-2024-21907/GHSA-5crp-9r3c-p9vr) in Newtonsoft.Json that could lead to Denial of Service attacks through excessively nested JSON payloads.

Changes

  • Added a recommended MaxDepth=128 limit to JsonSerializerSettings to prevent JSON deserialization attacks
  • Added CheckAdditionalContent=true for extra security validation
  • Updated assembly version from 2.3.6.1 to 2.3.6.2 to track this security fix

Security Impact

This change mitigates a Denial of Service vulnerability where maliciously crafted JSON with excessive nesting could cause:

  • High CPU and memory consumption
  • Thread exhaustion
  • Potential StackOverflowException

References

@yuseok-kim-edushare yuseok-kim-edushare changed the title Fix Security Issue, Depth limit required to keep secure Fix Security Issue: Implement JSON Deserialization Depth Limit (CVE-2024-21907) Mar 18, 2025
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

Successfully merging this pull request may close these issues.

[Security Related] Fix about Newtonsoft.Json Using
1 participant