Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. webonyx/graphql-php
  4. ›
  5. GHSA-68jq-c3rv-pcrr

GHSA-68jq-c3rv-pcrr: graphql-php is affected by a Denial of Service via quadratic complexity in OverlappingFieldsCanBeMerged validation

April 14, 2026

The OverlappingFieldsCanBeMerged validation rule exhibits quadratic time complexity when processing queries with many repeated fields sharing the same response name. An attacker can send a crafted query like { hello hello hello ... } with thousands of repeated fields, causing excessive CPU usage during validation before execution begins.

This is not mitigated by existing QueryDepth or QueryComplexity rules.

Observed impact (tested on v15.31.4):

  • 1000 fields: ~0.6s
  • 2000 fields: ~2.4s
  • 3000 fields: ~5.3s
  • 5000 fields: request timeout (>20s)

Root cause: collectConflictsWithin() performs O(n²) pairwise comparisons of all fields with the same response name. For identical repeated fields, every comparison returns “no conflict” but the quadratic iteration count causes resource exhaustion.

Fix: Deduplicate structurally identical fields before pairwise comparison, reducing the complexity from O(n²) to O(u²) where u is the number of unique field signatures (typically 1 for this attack pattern).

Credit: Ashwak N (ashwakn04@gmail.com)

References

  • github.com/advisories/GHSA-68jq-c3rv-pcrr
  • github.com/webonyx/graphql-php
  • github.com/webonyx/graphql-php/releases/tag/v15.31.5
  • github.com/webonyx/graphql-php/security/advisories/GHSA-68jq-c3rv-pcrr

Code Behaviors & Features

Detect and mitigate GHSA-68jq-c3rv-pcrr with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 15.31.5

Fixed versions

  • 15.31.5

Solution

Upgrade to version 15.31.5 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-407: Inefficient Algorithmic Complexity

Source file

packagist/webonyx/graphql-php/GHSA-68jq-c3rv-pcrr.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 06 May 2026 00:20:12 +0000.