CVE-2026-133744 in Json-Pathinfo

Summary

by MITRE • 11/25/2026

The fixes for CVE-2026-135804 (GHSA-cpww-5vpx-72x7) bound the regex work of a JsonCrawler::find() call, and evaluate filters and absolute queries once per call. Chained recursive descent isn't bounded. Each ..* segment takes the descendants of every node selected so far. A node nested in other selected nodes is counted once per such ancestor. So the size of the node list is a power of the depth, one power per segment. RFC 9535 allows these duplicates.

$document = 'null'; for ($i = 0; $i < 40; ++$i) {
$document = '{"a":'.$document.',"b":1}';
}

// 484 bytes (new JsonCrawler($document))->find('$..*..*..*'); // 19760 nodes, 0.42 s, 35 MB (new JsonCrawler($document))->find('$..*..*..*..*'); // 182780 nodes, 77 s, 256 MB

Each additional ..* multiplies the time and the memory. Other queries hold the process the same way, because work that doesn't depend on the node is repeated for each node. Unions that repeat a selector, like $[0,0,0,0,0][0,0,0,0,0], multiply the node list at each segment. Every filter operand is parsed again for each node, and nested function calls like length(length(...(@.a)...)) are scanned again at each level. Operands that don't refer to @, like length($.text) or $ == $, are computed again for each node. And a query of a few megabytes exhausts the memory before it's even parsed. A 3 KB query took 10 s on an 801-byte document, and the 8-byte $[?$==$] took 11.5 s on an 80 KB document.

The threat model is the one of CVE-2026-135804, where an application runs a query chosen by the client on its own document. A short query is enough to hold the process when the document is nested a few dozen levels deep. A larger document needs less nesting.

JsonCrawler::find() now builds node lists in linear time, and bounds the work of one call. The budget is 100,000 nodes, plus 32 for each value of the decoded document once the first 100,000 are spent. The selected nodes count, and so do the children that brackets and descents look at. Filter operands and their parts, deep comparisons and regular expressions count too. A query that needs more throws a JsonCrawlerException, also inside an existence test, instead of running until the process is stopped. Queries under the limit return the same nodes as before, duplicates included.

Operands that don't refer to @ are now evaluated once per call. Queries longer than 100,000 bytes and filters longer than 10,000 bytes are rejected before they're parsed.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 11/25/2026

The vulnerability identified as CVE-2026-135804 represents a critical resource exhaustion flaw within the JsonCrawler::find() method, specifically affecting how recursive descent and filter evaluation operations are processed against JSON documents. This issue stems from an algorithmic inefficiency where chained recursive descent patterns, such as $.., do not bound their computational complexity relative to the depth of nested nodes. In this flawed implementation, each segment like .. causes the crawler to select descendants for every node already in the selection list. Consequently, if a node is nested within multiple selected ancestors, it is counted and processed once per ancestor, leading to an exponential growth in the number of nodes handled rather than linear or polynomial scaling. This behavior allows an attacker to trigger severe performance degradation by crafting queries that exploit deep nesting structures, effectively turning standard JSON path traversal into a vector for Denial of Service attacks.

The operational impact of this vulnerability is characterized by extreme consumption of CPU and memory resources, which can lead to process hangs or crashes in affected applications. For instance, processing a query with multiple chained recursive descent operators on a moderately nested document can result in the generation of hundreds of thousands of node references, consuming significant memory and taking tens of seconds to complete. The complexity escalates rapidly; adding just one additional ..* segment can multiply both time and memory usage by orders of magnitude. Furthermore, filter operands that do not reference the current context variable @ are re-evaluated for every single node in the selection list rather than being computed once per call. This redundancy means even simple comparisons or function calls without local references contribute disproportionately to the processing load, allowing short queries on deeply nested documents or larger documents with simpler structures to exhaust system resources before completion.

From a threat modeling perspective, this vulnerability aligns with CWE-400: Uncontrolled Resource Consumption and is exploitable in scenarios where an application accepts user-supplied JSON path queries against its own data stores. This maps closely to ATT&CK technique T1496: Resource Hijacking, as the attacker leverages legitimate functionality to consume excessive computational resources, thereby degrading service availability for other users or causing system instability. The attack does not require authentication if the query input is derived from client-side requests, making it a viable remote exploitation vector in web applications that parse JSON and allow dynamic querying of internal data structures.

The remediation strategy implemented addresses these inefficiencies by introducing strict bounds on computational work within each find() call. The system now enforces a budget limit of 100,000 nodes for the selection list, with an additional allowance of thirty-two nodes per value in the decoded document once that threshold is exceeded. This cap applies to selected nodes as well as children examined during bracket and descent operations. Filter operands, deep comparisons, and regular expressions are also counted against this budget. If a query exceeds these limits or if input strings surpass predefined size thresholds—specifically queries longer than 100,000 bytes and filters longer than 10,000 bytes—the system rejects the operation early in the parsing phase rather than attempting execution. This proactive rejection prevents resource exhaustion by failing fast before significant processing occurs.

The fix ensures that operands not referring to the current context are evaluated only once per call instead of repeatedly for each node, significantly reducing redundant computational overhead. Queries that remain within the defined limits continue to return results consistent with previous behavior, including duplicates as permitted by RFC 9535 regarding JSON path semantics. However, any query requiring resources beyond the established budget throws a JsonCrawlerException, thereby protecting the application from hanging or crashing due to unbounded recursion and redundant evaluations. This approach balances functional correctness for legitimate use cases while effectively mitigating the risk of resource exhaustion attacks by enforcing strict limits on processing depth and complexity.

Responsible

Symfony

Reservation

11/20/2026

Disclosure

11/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00653

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!