CVE-2026-45756: Symfony/json path Denial of Service Vulnerability

LOW
Advisory Identifier: GHSA-8v8v-g73j-492j
CWE-400 CWE-1333
Published
Advisory Summary

CVE-2026-45756 is a LOW denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Symfony/json path libraries in the Packagist ecosystem. The issue involves symfony's jsonpath evaluates attacker-controlled regular expressions in match()/search() without limits — redos. Remediation is available by upgrading affected packages to version 7.4.12, 8.0.12.

CVE-2026-45756 at a Glance

CVE Identifier CVE-2026-45756
GHSA Identifier GHSA-8v8v-g73j-492j
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Symfony/json path
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-45756

To remediate this vulnerability, upgrade all affected Symfony/json path dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

symfony/json-path fixed: 7.4.12
Upgrade symfony/json-path to 7.4.12
symfony/json-path fixed: 8.0.12
Upgrade symfony/json-path to 8.0.12
symfony/symfony fixed: 7.4.12
Upgrade symfony/symfony to 7.4.12
symfony/symfony fixed: 8.0.12
Upgrade symfony/symfony to 8.0.12
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for symfony/json-path

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-45756, inspect your project dependencies for Symfony/json path:

inspect dependencies for symfony/json-path

Analyze the terminal output to locate any version of Symfony/json path in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.4.12), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Symfony/json path, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Description The `JsonPath` component's `match()` and `search()` filter functions compile a caller-supplied pattern straight into `preg_match()`: ```php 'match' => @preg_match(\sprintf('/^%s$/u', $this->transformJsonPathRegex($argList[1])), $value), 'search' => @preg_match("/{$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 `preg_match()` 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 `preg_match()` calls through a helper that lowers `pcre.backtrack_limit` 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](https://github.com/symfony/symfony/commit/1ac2d47418ec23066112db1e6ca35be6fe123d14) for branch 7.4. ### Credits Symfony would like to thank Himanshu Anand for reporting the issue and Alexandre Daubois for providing the fix.

CVE-2026-45756 Affected Symfony/json path Versions

4 component(s)
Fixed Versions:
7.4.128.0.12
Product / Package Ecosystem Affected Versions Fixed Version
symfony/json-path
Packagist
≥ 7.3.0
< 7.4.12
7.4.12
symfony/json-path
Packagist
≥ 8.0.0
< 8.0.12
8.0.12
symfony/symfony
Packagist
≥ 7.3.0
< 7.4.12
7.4.12
symfony/symfony
Packagist
≥ 8.0.0
< 8.0.12
8.0.12

References

Frequently Asked Questions

What is CVE-2026-45756?
CVE-2026-45756 is a security vulnerability in Symfony/json path involving Symfony's JsonPath Evaluates Attacker-Controlled Regular Expressions in match()/search() Without Limits — ReDoS under CWE-400: Uncontrolled Resource Consumption.
Which Symfony/json path versions are affected?
Affected versions include releases prior to 7.4.12, 8.0.12 across affected packages: symfony/json-path, symfony/symfony.
What version fixes CVE-2026-45756?
Upgrading to 7.4.12, 8.0.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/json-path affected?
Yes, symfony/json-path is affected in releases prior to 7.4.12, 8.0.12. Upgrade your dependency to 7.4.12, 8.0.12 or later.
Is symfony/symfony affected?
Yes, symfony/symfony is affected in releases prior to 7.4.12, 8.0.12. Upgrade your dependency to 7.4.12, 8.0.12 or later.
What CWE is associated with CVE-2026-45756?
CVE-2026-45756 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Packagist dependencies for CVE-2026-45756?
Run the dependency tree command: 'inspect dependencies for symfony/json-path'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8v8v-g73j-492j",
  "modified" : "2026-05-28T17:34:55Z",
  "published" : "2026-05-28T17:34:55Z",
  "aliases" : [ "CVE-2026-45756" ],
  "summary" : "Symfony's JsonPath Evaluates Attacker-Controlled Regular Expressions in match()/search() Without Limits — ReDoS",
  "details" : "### Description\n\nThe `JsonPath` component's `match()` and `search()` filter functions compile a caller-supplied pattern straight into `preg_match()`:\n\n```php\n'match'  => @preg_match(\\sprintf('/^%s$/u', $this->transformJsonPathRegex($argList[1])), $value),\n'search' => @preg_match(\"/{$this->transformJsonPathRegex($argList[1])}/u\", $value),\n```\n\n`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 `preg_match()` calls are prefixed with `@`, the PCRE backtrack-limit errors that would otherwise surface are suppressed, leaving no log trace.\n\n### Conditions for exploitation\n\nAn application that evaluates an attacker-influenced JSONPath expression containing a `match()` / `search()` filter against any non-trivial JSON input.\n\n### Resolution\n\n`JsonCrawler` runs the `preg_match()` calls through a helper that lowers `pcre.backtrack_limit` to 10000 for the duration of the call (restoring the previous value afterwards), so a pathological pattern fails fast instead of stalling the worker.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/1ac2d47418ec23066112db1e6ca35be6fe123d14) for branch 7.4.\n\n### Credits\n\nSymfony would like to thank Himanshu Anand for reporting the issue and Alexandre Daubois for providing the fix.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/json-path"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.3.0"
      }, {
        "fixed" : "7.4.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/json-path"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.0.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.3.0"
      }, {
        "fixed" : "7.4.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.0.12"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/security/advisories/GHSA-8v8v-g73j-492j"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/commit/1ac2d47418ec23066112db1e6ca35be6fe123d14"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/json-path/CVE-2026-45756.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45756.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/symfony/symfony"
  }, {
    "type" : "WEB",
    "url" : "https://symfony.com/cve-2026-45756"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333", "CWE-400" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-28T17:34:55Z",
    "nvd_published_at" : null
  }
}