{"id":"CVE-2026-45756","aliases":["CVE-2026-45756","GHSA-8v8v-g73j-492j"],"related":[],"kind":"vulnerability","state":"published","title":"Symfony: JsonPath Evaluates Attacker-Controlled Regular Expressions in match()/search() Without Limits — ReDoS","summary":"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 preg_match() 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 preg_match() 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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2026-05-28T17:34:55.000Z","modified":"2026-09-10T03:50:46.368Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400","CWE-1333"],"affected":[{"ranges":[{"version":">= 7.3.0-BETA1, < 7.4.12","status":"affected"},{"version":">= 8.0.0-BETA1, < 8.0.12","status":"affected"}],"vendor":"symfony","product":"symfony","source":"cvelist"},{"ranges":[{"version":">= 7.3.0-BETA1, < 7.4.12","status":"affected"},{"version":">= 8.0.0-BETA1, < 8.0.12","status":"affected"}],"vendor":"symfony","product":"json-path","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"7.3.0","status":"affected","fixed":"7.4.12"}],"ecosystem":"Packagist","package":"symfony/json-path","purl":"pkg:composer/symfony/json-path","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.0.12"}],"ecosystem":"Packagist","package":"symfony/json-path","purl":"pkg:composer/symfony/json-path","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.3.0","status":"affected","fixed":"7.4.12"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0","status":"affected","fixed":"8.0.12"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"7.3.0","fixed":"7.4.12"},{"status":"affected","introduced":"8.0.0","fixed":"8.0.12"}],"vendor":"sensiolabs","product":"symfony","cpe":"cpe:2.3:a:sensiolabs:symfony:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-8v8v-g73j-492j","tags":["patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/commit/1ac2d47418ec23066112db1e6ca35be6fe123d14","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v7.4.12","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/symfony/symfony/releases/tag/v8.0.12","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/json-path/CVE-2026-45756.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-45756.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony","tags":["package"],"sources":["ghsa"]},{"url":"https://symfony.com/cve-2026-45756","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-21T18:48:48.712Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45756","url":"https://www.cve.org/CVERecord?id=CVE-2026-45756","licence":"CVE Terms of Use","modified":"2026-07-21T18:48:57.481Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8v8v-g73j-492j","url":"https://github.com/advisories/GHSA-8v8v-g73j-492j","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:46.368Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45756","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45756","licence":"Public domain","modified":"2026-07-21T19:17:10.237Z"}],"updatedAt":"2026-11-25T22:59:28.004Z","epss":{"score":0.00882,"percentile":0.60217,"date":"2026-12-01T12:00:22.000Z"}}