CVE-2025-31481 GraphQL query operations security can be bypassed

High 7.5 Published Updated

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.

PackageAffectedFixed in
api-platform/core PackagistAll versions3.4.17
api-platform/core PackagistAll versions3.4.17
api-platform/core PackagistFrom 4.0.0-alpha.14.0.22
api-platform/core PackagistFrom 4.0.0-alpha.14.0.22
api-platform/core PackagistFrom 4.1.0-alpha.14.1.5
api-platform/core PackagistFrom 4.1.0-alpha.14.1.5
6 more packages
api-platform/graphql PackagistAll versions3.4.17
api-platform/graphql PackagistAll versions3.4.17
api-platform/graphql PackagistFrom 4.0.0-alpha.14.0.22
api-platform/graphql PackagistFrom 4.0.0-alpha.14.0.22
api-platform/graphql PackagistFrom 4.1.0-alpha.14.1.5
api-platform/graphql PackagistFrom 4.1.0-alpha.14.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.

Is CVE-2025-31481 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free