CVE-2025-31481 GraphQL query operations security can be bypassed
Attackers can bypass configured security on GraphQL operations using the Relay special node type in API Platform Core.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-31481?
CVE-2025-31481 is a high-severity vulnerability in api-platform core, published on 3 Apr 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
API Platform Core is a system to create hypermedia-driven REST and GraphQL APIs. Using the Relay special node type you can bypass the configured security on an operation. This vulnerability is fixed in 4.0.22 and 3.4.17.
Weakness: CWE-863
Which versions are affected by CVE-2025-31481?
12 open source packages ship an affected version, including api-platform/core and api-platform/graphql.
| Package | Affected | Fixed in |
|---|---|---|
api-platform/core Packagist | All versions | 3.4.17 |
api-platform/core Packagist | All versions | 3.4.17 |
api-platform/core Packagist | From 4.0.0-alpha.1 | 4.0.22 |
api-platform/core Packagist | From 4.0.0-alpha.1 | 4.0.22 |
api-platform/core Packagist | From 4.1.0-alpha.1 | 4.1.5 |
api-platform/core Packagist | From 4.1.0-alpha.1 | 4.1.5 |
6 more packages
api-platform/graphql Packagist | All versions | 3.4.17 |
api-platform/graphql Packagist | All versions | 3.4.17 |
api-platform/graphql Packagist | From 4.0.0-alpha.1 | 4.0.22 |
api-platform/graphql Packagist | From 4.0.0-alpha.1 | 4.0.22 |
api-platform/graphql Packagist | From 4.1.0-alpha.1 | 4.1.5 |
api-platform/graphql Packagist | From 4.1.0-alpha.1 | 4.1.5 |
How do I fix CVE-2025-31481?
Upgrade api-platform/core to a fixed version for your release line: 3.4.17, 4.0.22 or 4.1.5.
Is CVE-2025-31481 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-31481 exists.
Sources
Also known as GHSA-cg3c-245w-728m.