CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-67221

Stack Overflowing the Unoverflowable: Breaking orjson (CVE-2025-67221)

Amit Schendel
Amit Schendel
Senior Security Researcher

Jan 23, 2026·5 min read·173 visits

Executive Summary (TL;DR)

Versions of `orjson` <= 3.11.4 fail to limit recursion depth during serialization. An attacker can crash any Python application using `orjson.dumps()` by supplying a deeply nested JSON object (e.g., a list of lists of lists). The fix requires upgrading to 3.11.5+.

orjson, the self-proclaimed 'fastest, most correct' Python JSON library, met its match in a simple recursive list. CVE-2025-67221 is a critical Denial of Service vulnerability where deep recursion in `orjson.dumps()` triggers a stack overflow, instantly crashing the Python process. While Rust usually saves us from memory corruption, it doesn't save us from physics—specifically, the finite size of the call stack.

The Hook: Speed at Any Cost

If you are a Python developer dealing with high-throughput APIs, you know orjson. It is the nitrous oxide of JSON libraries—written in Rust, avoiding the CPython overhead, and generally bragging about being "the fastest" and "most correct." It is the default choice for performance-critical frameworks like FastAPI.

But here is the thing about speed: safety features often add drag. When you are optimizing for nanoseconds, checking boundaries feels like a chore. The developers of orjson built a serializer that is blazingly fast but, until version 3.11.5, lacked a fundamental safety belt found in almost every other serializer: a recursion limiter.

This vulnerability (CVE-2025-67221) is a reminder that even memory-safe languages like Rust cannot protect you from logic flaws. If you let a user define the depth of your call stack, you are handing them the kill switch to your application.

The Flaw: Recursion Without Brakes

To understand this bug, you need to understand how JSON serialization typically works. When a library like orjson encounters a container type (like a dict or list), it usually calls itself recursively to process the contents.

In a healthy implementation (like Python's standard json module), there is a counter. Each time the function recurses, the counter increments. If counter > LIMIT (usually 1000 or 2000), the library throws a RecursionError and bails out gracefully.

In orjson versions $\le$ 3.11.4, this check was missing or insufficient for certain structures. The library would happily recurse until it hit the hard limit of the operating system's stack size. When the stack pointer exceeds its bounds, the OS doesn't send a polite Python exception; it sends a SIGSEGV (Segmentation Fault). The process dies instantly, without a traceback, without a try/except block to save it.

The Code: The Missing Guardrail

While orjson is closed-source about its exact proprietary optimizations, the fix is conceptually simple. The vulnerability exists in the Rust implementation of the serializer. Rust's memory safety guarantees ensure you won't get a buffer overflow in the heap, but stack overflows are fair game.

The Vulnerable Logic (Conceptual Rust):

fn serialize(value: &Value) -> Result<Vec<u8>, Error> {
    match value {
        Value::Array(arr) => {
            // Loop through and recurse blindly
            for item in arr {
                serialize(item)?;
            }
        },
        // ... other types
    }
}

The Fix:

The remediation involves threading a depth counter through the call stack or checking the remaining stack space (a feature Rust provides via libraries like stacker, though manual counting is cheaper).

fn serialize(value: &Value, depth: usize) -> Result<Vec<u8>, Error> {
    if depth > MAX_DEPTH {
        return Err(Error::RecursionLimitExceeded);
    }
    match value {
        Value::Array(arr) => {
            for item in arr {
                serialize(item, depth + 1)?;
            }
        },
        // ...
    }
}

Without this if statement, the CPU instruction pointer essentially drives off a cliff.

The Exploit: Crashing the Interpreter

Exploiting this is trivially easy. You don't need shellcode, you don't need ROP gadgets. You just need a nested list. The researchers who found this provided a straightforward Proof of Concept (PoC) that fits in a tweet.

Here is how you kill a vulnerable orjson process:

import orjson
 
# Construct a "Russian Nesting Doll" from hell
# Depth of ~100-200 is often enough to exhaust small stack limits
nested = []
for i in range(2000):
    nested = [nested]
 
print("Attempting to serialize...")
# The process will terminate immediately after this line
# No Python exception will be raised.
orjson.dumps(nested)

If you run this against a web server (e.g., a FastAPI endpoint that accepts JSON and logs it using orjson), the worker process will segfault. If the attacker sends these requests concurrently, they can keep knocking down workers as fast as the supervisor can spawn them, resulting in a total Denial of Service.

The Impact: Why It Matters

You might think, "So what? It's just a crash." But in modern microservices, availability is king.

  1. Hard Crash vs. Soft Exception: Standard Python RecursionError can be caught. You can log it, return a 400 Bad Request, and move on. A Segmentation Fault kills the process. All in-flight requests on that worker are dropped.
  2. Resource Exhaustion: An attacker can use very little bandwidth (a small, deeply nested JSON payload is only a few KB) to force the server to allocate stack memory until it crashes. This is a highly asymmetric attack.
  3. Widespread Usage: orjson is the darling of the Python async ecosystem. It is used in FastAPI, massive data processing pipelines, and logging aggregators. If your logging infrastructure uses orjson to dump context objects, an attacker might crash your logging sidecar just by sending weird data.

The Fix: Upgrade or Filter

The primary fix is simple: Upgrade to orjson >= 3.11.5 immediately. The maintainers have introduced recursion limits to prevent stack exhaustion.

If you cannot upgrade immediately, you must validate input depth before serialization. This is harder than it looks because you have to recursively walk the object yourself—which, ironically, is slow in Python, defeating the purpose of using orjson.

> [!TIP] > If you are using orjson in a web context, ensure your WAF or reverse proxy limits the size of the request body. While this doesn't strictly prevent deep nesting (you can nest deep in a small payload), it raises the bar for the attacker.

Official Patches

orjsonOfficial release notes for fixed version

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Probability
0.04%
Top 100% most exploited

Affected Systems

Python applications using orjson <= 3.11.4FastAPI applications using default orjson responsesData processing pipelines utilizing orjson for serialization

Affected Versions Detail

Product
Affected Versions
Fixed Version
orjson
ijl
<= 3.11.43.11.5
AttributeDetail
CWECWE-674 (Uncontrolled Recursion)
CVSS7.5 (High)
Attack VectorNetwork (Remote)
Availability ImpactHigh (Process Crash)
LanguagePython / Rust
Exploit StatusPoC Available

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
T1499.003Application Exhaustion Flood
Impact
CWE-674
Uncontrolled Recursion

The product does not properly control the amount of recursion that can occur, consuming excessive resources, such as memory or the stack.

Known Exploits & Detection

GitHub (Researcher PoC)Python script demonstrating segmentation fault via nested list serialization

Vulnerability Timeline

Vulnerability Publicly Disclosed
2025-01-22
Fix Released in orjson 3.11.5
2025-01-22

References & Sources

  • [1]Original Research & PoC
  • [2]GitHub Security Advisory
  • [3]NVD Detail

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•28 minutes ago•CVE-2026-114150
5.9

CVE-2026-114150: Remote Information Disclosure via Uninitialized Pooled Memory in ASP.NET Core Response Buffering

CVE-2026-114150 is a network-accessible information disclosure vulnerability affecting Microsoft ASP.NET Core in .NET 11.0 preview releases and Microsoft Visual Studio 2026 prior to version 18.12.0. The flaw stems from the use of uninitialized resources (CWE-908) within response buffering components, specifically ResponseBufferingStream used by middleware such as HTTP Logging and Output Caching. Because rented memory segments from ArrayPool<byte> or MemoryPool<byte> are not cleared upon return or strictly bounded to the exact written byte count during subsequent reads, residual response payloads from earlier HTTP requests remain in the buffer tail. Downstream consumers or log sinks reading these buffers expose confidential cross-session data, including authentication tokens and personally identifiable information.

Amit Schendel
Amit Schendel
1 views•11 min read
•about 1 hour ago•CVE-2026-114146
9.0

CVE-2026-114146: Elevation of Privilege in ASP.NET Core SignalR Connection Dispatcher

An incorrect authorization vulnerability (CWE-863) exists in the ASP.NET Core SignalR HTTP Connection Dispatcher (`Microsoft.AspNetCore.Http.Connections`). The connection negotiation process failed to bind the authenticated caller identity to the generated connection state, and subsequent transport or message dispatch handlers failed to verify caller consistency. Consequently, an authenticated low-privilege attacker who obtains a valid connection identifier or token can inject messages into or hijack another user's SignalR session, achieving an elevation of privilege across security boundaries.

Alon Barad
Alon Barad
3 views•11 min read
•about 2 hours ago•CVE-2026-109478
7.5

CVE-2026-109478: Algorithmic Complexity Denial of Service in ASP.NET Core Header Parsing

CVE-2026-109478 is a network-accessible Denial of Service (DoS) vulnerability in ASP.NET Core caused by inefficient algorithmic complexity (CWE-407) when parsing comma-separated HTTP request headers. Prior to the patch, the internal helper method ParsingHelpers.GetHeaderSplit repeatedly called StringValues.Concat inside a loop iterating over each comma-separated token. Because StringValues allocates a new array of size k + 1 and copies all existing elements upon each concatenation, processing N tokens incurs O(N^2) time and space complexity. An unauthenticated remote attacker can send HTTP requests with headers containing thousands of short, comma-separated values to exhaust CPU cycles and induce severe Garbage Collection (GC) pauses, rendering the web application unresponsive.

Alon Barad
Alon Barad
6 views•11 min read
•about 3 hours ago•CVE-2026-114147
7.5

CVE-2026-114147: Denial of Service via Memory Leak in ASP.NET Core SignalR Redis Backplane

CVE-2026-114147 is a high-severity Denial of Service (DoS) vulnerability affecting ASP.NET Core and specifically the Microsoft.AspNetCore.SignalR.StackExchangeRedis scale-out provider across .NET 8.0, 9.0, 10.0, and 11.0 preview releases. The vulnerability originates from a string comparison mismatch between internal per-connection group collections and the centralized Redis channel subscription registry, compounded by a race condition during connection teardown. Remote unauthenticated attackers can exploit this flaw to leave orphaned connection contexts and active Redis pub/sub listeners pinned in memory, leading to unbounded memory exhaustion and application process termination.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 4 hours ago•CVE-2026-114156
6.5

CVE-2026-114156: Path Equivalence Security Feature Bypass in Microsoft ASP.NET Core

CVE-2026-114156 is an improper resolution of path equivalence vulnerability (CWE-41) in Microsoft ASP.NET Core affecting .NET 11.0 preview releases and Microsoft Visual Studio 2026. The vulnerability stems from a discrepancy between how path prefix validation helpers (such as PathString.StartsWithSegments) and downstream routing mechanisms handle alternate path separators and percent-encoded characters. An unauthenticated remote attacker can exploit this mismatch over the network to bypass path-based authorization middleware and access restricted endpoints.

Amit Schendel
Amit Schendel
5 views•8 min read
•about 5 hours ago•CVE-2026-114157
7.5

CVE-2026-114157: Local Privilege Escalation via Race Condition in ASP.NET Core Kestrel Named Pipes Transport

CVE-2026-114157 is a high-severity local privilege escalation and security feature bypass vulnerability affecting ASP.NET Core on Microsoft Windows. The flaw resides in the Kestrel web server's Named Pipes transport layer (Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes) and stems from a race condition (CWE-362) during broken pipe error recovery. When an active connection throws an IOException during handshake acceptance, the connection listener previously disposed of the broken NamedPipeServerStream instance before acquiring a replacement stream from its internal pool. This sequence created a momentary window where zero server instances of the named pipe existed in the Windows Named Pipe File System (NPFS). A local, low-privileged attacker can exploit this timing window to create a named pipe with the identical name and a permissive Discretionary Access Control List (DACL), hijacking subsequent inter-process communications and escalating privileges across security boundaries.

Amit Schendel
Amit Schendel
6 views•11 min read