Unbounded CPU use in Symfony JsonPath filters lets a crafted query tie up a PHP worker

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2026-135804?

CVE-2026-135804 is a vulnerability classified as Uncontrolled Resource Consumption, Inefficient Algorithmic Complexity, and Inefficient Regular Expression Complexity, affecting symfony/json-path (affected versions: 7.3.0 – < 7.4.23 and 8.0.0 – < 8.1.11) and symfony/symfony (affected versions: 7.3.0 – < 7.4.23 and 8.0.0 – < 8.1.11). The severity of this vulnerability has not yet been determined. There is not enough data to determine whether this vulnerability has been exploited.

Overview

Original source data

The fix for CVE-2026-45756 lowers pcre.backtrack_limit to 10000 around each preg_match() call of the match() and search() filter functions. That limit applies to one starting position, not to one call. PCRE resets its counter at every position it tries a match from. So an unanchored pattern that stays just under the limit is paid once per byte of the subject. Each call also starts from a fresh limit, so chaining clauses in one filter multiplies the work. Two other paths made the cost of a query grow faster than its size, without any regular expression: - The filter evaluator scanned the whole expression for logical operators once per node. Its cost grew with the square of the number of chained clauses. - Queries starting with $ inside a filter, like @.x == $.limit or length($.items), were evaluated again for every node the filter visits. An application that evaluates an attacker-influenced JSONPath expression can therefore still be made to hold a PHP worker. A document of 2 MB and a query of 2.5 KB take 3.5 minutes of CPU. JsonCrawler::find() now bounds the total regex work of one call, and throws an exception when that budget is exhausted. Filter expressions are parsed once per query, and absolute queries inside filters are evaluated once per query.

Affected products and scope

The affected packages are symfony/json-path and the symfony/symfony monorepo, in the release lines listed by the vendor. Releases at or beyond the fixed versions in each line are not affected. The flaw is in filter evaluation, so only code paths that evaluate JSONPath filter expressions are in scope; applications that use the library to walk documents with plain paths and never build filters from untrusted input are not exposed in the way described.

Technical details

The weakness is uncontrolled resource consumption driven by inefficient algorithmic complexity, in the filter evaluation of Symfony json-path. The earlier mitigation lowered pcre.backtrack_limit around each preg_match() call in the match() and search() filter functions. That limit is per starting position, because PCRE resets its counter at every position it attempts a match from, so an unanchored pattern that stays just under the limit is paid once per byte of the subject. Each call also starts from a fresh budget, so chaining clauses in one filter multiplies the work. Two further paths scale without any regular expression: the filter evaluator scanned the whole expression for logical operators once per node, growing with the square of the number of chained clauses, and queries starting with $ inside a filter were re-evaluated for every node the filter visits. The fix bounds the total regex work of one JsonCrawler::find() call and throws an exception when that budget is exhausted, parses filter expressions once per query, and evaluates absolute queries inside filters once per query.

Exploitability

Reachability depends entirely on the application: the attacker must be able to influence the JSONPath expression that reaches JsonCrawler::find(), either directly through a request parameter or indirectly through stored data that is later used as a query. The record does not state an authentication requirement or a user interaction requirement, and it does not report exploitation in the wild. Public detail beyond the vendor description is limited; there is no published exploit in the record.

Technical impact

An attacker gains the ability to consume CPU time on the application server in proportion to document size and query complexity rather than to the amount of data returned. That holds a PHP worker, and a small number of such requests can occupy the pool. The record describes no memory corruption, no file access and no data disclosure, and the effect ends when the request is abandoned or completes.

Business impact

Anyone whose Symfony application lets users supply or shape a JSONPath expression, directly or through stored queries and templates, can be forced into worker exhaustion. The consequence is availability rather than data exposure: request queues back up, other users see timeouts, and under enough load the PHP process pool saturates and the service degrades for everyone. On shared infrastructure the effect can spill onto neighbouring services. Teams that accept JSONPath from tenants, saved searches, reporting tools or low-privilege accounts should treat this as a priority fix, since the cost is paid by the server, not the caller.

Remediation

Upgrade symfony/json-path and symfony/symfony to the fixed releases for your branch. A patch is available from the vendor and the fixes are recorded in the advisory. If you cannot upgrade immediately, stop passing attacker-influenced strings into JSONPath filter expressions, or restrict who can submit them. The record describes no configuration workaround that restores the old behaviour safely.

Detection

Watch PHP worker saturation and slow-request rates for endpoints that build JSONPath queries, and alert on requests that run far longer than the data volume justifies. Log and review exception messages from JsonCrawler when the new regex budget is exhausted, since those are direct evidence of an over-expensive query. Keep an audit trail of the JSONPath expressions your application accepts, including the submitting account, so a spike can be attributed and the input path closed. Profiling filter-heavy code paths will show the same cost before it becomes an outage.

Sources (9)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.