CVE-2026-45756: Symfony: JsonPath Evaluates Attacker-Controlled Regular Expressions in match()/search() Without Limits — ReDoS

Published May 28, 2026
·
Updated

Description

The JsonPath component's match() and search() filter functions compile a caller-supplied pattern straight into pregmatch():

php 'match' => @pregmatch(\sprintf('/^%s$/u', $this->transformJsonPathRegex($argList[1])), $value), 'search' => @pregmatch("/{$this->transformJsonPathRegex($argList[1])}/u", $value),

transformJsonPathRegex() only performs cosmetic escaping: there is no length cap, no restriction to the RFC 9485 i-regexp subset, and no bound on backtracking. An application that evaluates an attacker-influenced JSONPath expression server-side (e.g. one taken from a query parameter or API field and passed to JsonCrawler) can therefore be made to run a catastrophic-backtracking pattern such as $[?search(@, "(a+)+$")]. Evaluated against a moderately sized document, this pins a CPU core for seconds per request, so a handful of concurrent requests exhausts the worker pool: a denial of service. Because the pregmatch() calls are prefixed with @, the PCRE backtrack-limit errors that would otherwise surface are suppressed, leaving no log trace.

Conditions for exploitation

An application that evaluates an attacker-influenced JSONPath expression containing a match() / search() filter against any non-trivial JSON input.

Resolution

JsonCrawler runs the pregmatch() calls through a helper that lowers pcre.backtracklimit to 10000 for the duration of the call (restoring the previous value afterwards), so a pathological pattern fails fast instead of stalling the worker.

The patch for this issue is available here for branch 7.4.

Credits

Symfony would like to thank Himanshu Anand for reporting the issue and Alexandre Daubois for providing the fix.

Other sources

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. From 7.3.0-BETA1 until 7.4.12 and 8.0.12, the JsonPath component compiles attacker-controlled match() and search() filter patterns directly into pregmatch() without a length cap, i-regexp restriction, or bounded backtracking, allowing catastrophic-backtracking expressions to pin worker CPU and cause denial of service. This issue is fixed in versions 7.4.12 and 8.0.12.

MITRE

Affected Software

6 affected componentsFixes available
composer/symfony/symfony>=8.0.0<8.0.12
8.0.12
composer/symfony/symfony>=7.3.0<7.4.12
7.4.12
composer/symfony/json-path>=8.0.0<8.0.12
8.0.12
composer/symfony/json-path>=7.3.0<7.4.12
7.4.12
SensioLabs Symfony>=7.3.0<7.4.12
SensioLabs Symfony>=8.0.0<8.0.12

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 8.0.12
  2. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 7.4.12
  3. Upgrade

    Upgrade composer/symfony/json-path to a version that resolves this vulnerability.

    Fixed in 8.0.12
  4. Upgrade

    Upgrade composer/symfony/json-path to a version that resolves this vulnerability.

    Fixed in 7.4.12
  5. Upgrade

    Upgrade Symfony JsonPath component to a version that resolves this vulnerability.

    Fixed in 7.4.12
  6. Upgrade

    Upgrade Symfony JsonPath component to a version that resolves this vulnerability.

    Fixed in 8.0.12

Event History

May 28, 2026
Advisory Published
via GitHub·05:34 PM
Data Sourced
via GitHub·05:34 PM
DescriptionWeaknessAffected Software
Jul 14, 2026
CVE Published
via MITRE·05:57 PM
Data Sourced
via MITRE·05:57 PM
DescriptionWeakness
Data Sourced
via NVD·06:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-45756?

CVE-2026-45756 has a risk score of 35.

2

How do I fix CVE-2026-45756?

To fix CVE-2026-45756, update the affected components in your Symfony application to the latest secure version.

3

Which components are affected by CVE-2026-45756?

CVE-2026-45756 affects the JsonPath component within composer/symfony/symfony and composer/symfony/json-path.

4

What types of attacks does CVE-2026-45756 enable?

CVE-2026-45756 could potentially enable regular expression injection attacks due to improper pattern handling in the vulnerable functions.

5

When was CVE-2026-45756 published?

CVE-2026-45756 was published on May 28, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203