Graphql Php
CVE-2026-40476
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSend HTTP POST with crafted GraphQL query
-
DeliveryParser accepts query syntax
-
ExploitOverlappingFieldsCanBeMerged rule triggered
-
InstallValidator performs O(n²) field comparisons
-
C2Excessive CPU consumed during validation
-
ExecuteQuery validation timeout or server resource exhaustion
-
ImpactDenial of service to concurrent requests
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | The vulnerability requires sending a GraphQL query with high field repetition to an endpoint running graphql-php 15.31.4 or below. No authentication is required (PR:N in CVSS vector). The vulnerability is not dependent on specific schema configuration, non-default features, or particular GraphQL execution modes-it affects validation of any query sent to a vulnerable server, regardless of schema. The attacker does not need to know the GraphQL schema in advance; even a query against unknown fields will trigger the validation rule. The only limiting factor is that the query must parse syntactically as valid GraphQL and reach the validation phase; invalid syntax is rejected before validation. Actual impact depends on endpoint load and server resources: a query with 1,000 fields may cause minor CPU spike, while 10,000 fields may trigger noticeable slowdown or timeout. |
| Impact | CVSS 6.9 with network vector (AV:N), low complexity (AC:L), and no privilege requirements (PR:N) indicates remote unauthenticated attackers can trigger the flaw against default configurations. However, the CVSS impact vector shows only availability impact (VA:L, not VA:H), reflecting denial of service rather than data breach or arbitrary code execution. The attack is not rate-limited by typical GraphQL query depth or complexity rules, which inspect different metrics and do not account for field repetition patterns. This is a practical availability risk because GraphQL endpoints are often exposed to untrusted networks and accept complex nested queries by design. The lack of authentication requirements and network-only access vector mean any internet-connected GraphQL endpoint running 15.31.4 or below is exploitable. No indication of active exploitation (KEV status not provided, no POC referenced) suggests this is a medium-priority availability flaw rather than an imminent critical threat, but deployments handling user-facing queries should prioritize patching to prevent resource exhaustion attacks. |
| Exploit ScenarioDerived | An attacker crafts a GraphQL query containing 5,000 identical field selections all sharing the same response name within a single parent object, e.g., '{field field field field ...}'. The query is sent via HTTP POST to a GraphQL endpoint running version 15.31.4. The OverlappingFieldsCanBeMerged validator attempts to perform approximately 12.5 million pairwise comparisons, consuming significant CPU and blocking other requests until validation completes or times out, effectively denying service to legitimate users. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 17, 2026
Denial of service in graphql-go versions 15.31.4 and below allows remote unauthenticated attackers to trigger excessive CPU consumption during GraphQL query validation by submitting queries with thousands of repeated identical fields, exploiting O(n²) complexity in the OverlappingFieldsCanBeMerged validation rule. The vulnerability bypasses existing QueryDepth and QueryComplexity mitigations. Vendor-released patch: version 15.31.5.
RemediationAI
Upgrade graphql-php to version 15.31.5 or later immediately. This release includes an optimized OverlappingFieldsCanBeMerged validation rule that eliminates the O(n²) complexity. For organizations unable to upgrade immediately, implement the following compensating controls: (1) Configure a maximum query complexity limit at the application level (e.g., using Apollo Server's costsEnabled or similar GraphQL middleware) set to a conservative value (e.g., complexity points per field); (2) Implement rate-limiting on the GraphQL endpoint per IP or authenticated user, capping requests to 10-50 per second; (3) Set a hard timeout on query validation (e.g., 2-5 seconds) that aborts validation and returns an error if validation time exceeds the threshold-note this reduces availability for legitimate deep-nesting queries; (4) Monitor CPU usage on GraphQL endpoints and alert on sustained spikes above baseline. Each control has trade-offs: complexity limits may reject legitimate queries, rate-limiting affects all users equally, and validation timeouts degrade service for complex but valid queries. Patching is the definitive fix and should be prioritized.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
graphql-go (webonyx/graphql-php) is a PHP implementation of the GraphQL specification, which defines a validation phase occurring before query execution. The OverlappingFieldsCanBeMerged rule (part of the GraphQL validation spec) ensures that fields with the same response name can be safely merged during execution. In affected versions, this rule performs pairwise comparisons of all fields sharing the same response name without optimization, resulting in O(n²) algorithm complexity. When an attacker sends a query with n repeated identical fields, the validator performs n×(n-1)/2 comparisons, consuming CPU linearly with the square of field count. This occurs during the validation phase, before any rate-limiting or execution-level protections can intervene. The root cause is classified under CWE-407 (Inefficient Algorithmic Complexity), indicating inadequate algorithmic efficiency in a security-relevant operation.
Know when Graphql Php gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Primary rating from Vendor (GitHub_M) · only source for this CVE.
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
3DescriptionCVE.org
graphql-go is a Go implementation of GraphQL. In versions 15.31.4 and below, the OverlappingFieldsCanBeMerged validation rule performs O(n²) pairwise comparisons of fields sharing the same response name. An attacker can send a query with thousands of repeated identical fields, causing excessive CPU usage during validation before execution begins. This is not mitigated by existing QueryDepth or QueryComplexity rules. This issue has been fixed in version 15.31.5.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB