<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Webonyx — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/webonyx/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 05 May 2026 14:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/webonyx/feed.xml" rel="self" type="application/rss+xml"/><item><title>graphql-php OverlappingFieldsCanBeMerged Quadratic Complexity Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-05-graphql-php-resource-exhaustion/</link><pubDate>Tue, 05 May 2026 14:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-graphql-php-resource-exhaustion/</guid><description>The `OverlappingFieldsCanBeMerged` validation rule in `webonyx/graphql-php` has an `O(n^2 x m^2)` worst-case complexity due to flattened inline fragments, leading to potential resource exhaustion.</description><content:encoded><![CDATA[<p>The <code>OverlappingFieldsCanBeMerged</code> validation rule in <code>webonyx/graphql-php</code> is vulnerable to a quadratic complexity issue due to how it handles inline fragments. Specifically, the pairwise comparison loop within the <code>collectConflictsWithin</code> function can lead to an <code>O(n^2 x m^2)</code> worst-case scenario when processing queries with nested inline fragments. A 364 KB query with 200 outer and 100 inner inline fragments was observed to consume 117 seconds of CPU time per request on <code>webonyx/graphql-php@v15.31.4</code> running on PHP 8.3.30. The existing named-fragment cache (CVE-2023-26144) does not cover inline fragments, making the system vulnerable to denial-of-service attacks through resource exhaustion. This affects applications using the standard validation pipeline, including Lighthouse, Overblog/GraphQLBundle, wp-graphql, and Drupal GraphQL.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a GraphQL query with a large number of nested inline fragments.</li>
<li>The query is submitted to a <code>webonyx/graphql-php</code> application.</li>
<li>The <code>DocumentValidator::validate()</code> function invokes the default rules, including <code>OverlappingFieldsCanBeMerged</code>.</li>
<li>Within <code>OverlappingFieldsCanBeMerged.php</code>, the <code>internalCollectFieldsAndFragmentNames</code> function flattens inline fragments into the parent <code>$astAndDefs</code> map, increasing the size of the map.</li>
<li>The <code>collectConflictsWithin</code> function iterates through the flattened fields, performing an <code>O(n^2)</code> pairwise comparison of fields.</li>
<li>The <code>findConflict</code> function is recursively called for sub-selections, compounding the cost to <code>O(n^2 x m^2)</code>.</li>
<li>Due to the absence of a comparison budget or validation timeout, the validation process consumes excessive CPU resources.</li>
<li>The PHP worker process becomes pinned, leading to potential denial of service via worker pool exhaustion.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>A successful attack can lead to a denial of service (DoS) due to the exhaustion of server resources. A single 364 KB query can consume 117 seconds of CPU time, potentially exhausting the php-fpm worker pool. Systems with default configurations, such as Lighthouse/Laravel deployments, may be vulnerable even with <code>max_execution_time</code> limits, as the worker may burn significant CPU time before being terminated. Exploitation can bypass body-size limits and WAF rules via gzip compression, as the decompressed payload is much larger than the compressed one. The vulnerability affects all applications using the standard validation pipeline in <code>webonyx/graphql-php</code> versions prior to 15.32.2.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to <code>webonyx/graphql-php</code> version 15.32.2 or later, which includes a fix that addresses this vulnerability.</li>
<li>Implement a comparison budget in <code>OverlappingFieldsCanBeMerged</code> to limit the number of comparisons performed during validation, as described in the remediation options.</li>
<li>Consider capping inline-fragment flattening in <code>internalCollectFieldsAndFragmentNames</code> to prevent excessive growth of the <code>$astAndDefs</code> map, as outlined in the remediation options.</li>
<li>Deploy the Sigma rule <code>Detect GraphQL PHP Excessive Validation Time</code> to identify potential exploitation attempts by monitoring the execution time of GraphQL validation processes.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>graphql</category><category>php</category><category>resource-exhaustion</category><category>vulnerability</category></item></channel></rss>