CVE-2025-31485 GraphQL grant on a property might be cached with different objects

High 7.5 Published Updated

Attackers can bypass GraphQL property access controls due to incorrect cache key generation, potentially reading unauthorized data.

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-31485?

CVE-2025-31485 is a high-severity missing authorization 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. Prior to 4.0.22 and 3.4.17, a GraphQL grant on a property might be cached with different objects. The ApiPlatform\GraphQl\Serializer\ItemNormalizer::isCacheKeySafe() method is meant to prevent the caching but the parent::normalize method that is called afterwards still creates the cache key and causes the issue. This vulnerability is fixed in 4.0.22 and 3.4.17.

Weakness: CWE-696

Which versions are affected by CVE-2025-31485?

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-31485?

Upgrade api-platform/core to a fixed version for your release line: 3.4.17, 4.0.22 or 4.1.5.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2025-31485 being exploited?

There is no known exploitation of CVE-2025-31485 in the wild and no public exploit code.

Sources

Also known as GHSA-428q-q3vv-3fq3.

Is CVE-2025-31485 in your software?

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

Check your SBOMs for free