Skip to main content

Graphql Php CVE-2026-40476

MEDIUM
Inefficient Algorithmic Complexity (CWE-407)
2026-04-17 GitHub_M
6.9
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Send HTTP POST with crafted GraphQL query
  2. Delivery
    Parser accepts query syntax
  3. Exploit
    OverlappingFieldsCanBeMerged rule triggered
  4. Install
    Validator performs O(n²) field comparisons
  5. C2
    Excessive CPU consumed during validation
  6. Execute
    Query validation timeout or server resource exhaustion
  7. Impact
    Denial 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

composer webonyx/graphql-php fix: 15.31.5

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

Vendor (GitHub_M) PRIMARY 6.9 MEDIUM
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Patch released
Apr 18, 2026 - 02:30 nvd
Patch available
CVSS changed
Apr 17, 2026 - 22:22 NVD
6.9 (MEDIUM)
CVE Published
Apr 17, 2026 - 21:42 nvd
MEDIUM 6.9

DescriptionCVE.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

EPSS Score
0.0%
Top 94% exploitable
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)CVE.org

cpe:2.3:a:webonyx:graphql-php:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy