orjson Recursion Limit Vulnerability in JSON Serialization Function

Vulnerability

A denial-of-service vulnerability has been identified in the orjson library, specifically in the orjson.dumps() function, for versions through 3.11.4. The vulnerability arises because the function does not impose a recursion limit when serializing deeply nested JSON documents. This lack of restriction can lead to uncontrolled recursion, causing the application to crash. The issue can be exploited remotely if an attacker can control the data being serialized.

Impact

Exploitation of this vulnerability can cause applications to crash by overwhelming the call stack with too many nested levels, leading to a stack overflow.

Reproduction

The vulnerability can be reproduced by creating a JSON structure with excessive nesting, such as 100 levels deep, and then serializing it with the orjson.dumps() function. This process will cause a stack overflow, crashing the application.

Added: Jan 22, 2026, 6:24 PM
Updated: Jan 22, 2026, 6:24 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
8.7
remediation
0.0
relevance
2.3
threat
6.4
urgency
2.9
incentive
4.2

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.