webonyx/graphql-php has quadratic validation cost
Affects webonyx/graphql-phpSource GCVE Database
CVSS 7.5 High : upgrade to 15.32.2 soon.
Data as of 27 Oct 2026, 01:29 UTC
- Patch
- Available – fixed in 15.32.2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HWhat to do
Upgrade webonyx/graphql-php to 15.32.2.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Packagistwebonyx/graphql-php | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in webonyx/graphql-php version 15.32.2. Users should upgrade to this version or later to mitigate the vulnerability. There is no workaround or configuration option to limit validation cost or apply a timeout in the current library versions.
Description
The webonyx/graphql-php library has a performance vulnerability in its OverlappingFieldsCanBeMerged validation rule. The rule exhibits quadratic to quartic complexity (O(n^2 x m^2)) when processing nested inline fragments, causing excessive CPU consumption for large queries with many inline fragments. This is due to the lack of caching for inline fragments, which are unnamed and thus not covered by the existing named-fragment cache. The issue affects version 15.31.4 and earlier and is fixed in version 15.32.2.
References
- github.com/webonyx/graphql-php/security/advisories/GHSA-fc86-6rv6-2jpm (opens in a new tab)
- github.com/graphql/graphql-js/issues/2185 (opens in a new tab)
- github.com/sangria-graphql-org/sangria/pull/12 (opens in a new tab)
- github.com/webonyx/graphql-php/commit/996adcfce33442f6fc01214777bc8620cc142d85 (opens in a new tab)
- github.com/advisories/GHSA-9pv7-vfvm-6vr7 (opens in a new tab)
- github.com/advisories/GHSA-p4qx-6w5p-4rj2 (opens in a new tab)
- github.com/webonyx/graphql-php (opens in a new tab)
- github.com/webonyx/graphql-php/releases/tag/v15.32.2 (opens in a new tab)
- spec.graphql.org/October2021/ (opens in a new tab)