CVE-2025-31485

High

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.

SeverityHigh
CVSS7.5
Exploit probability—
ProductApi-platform/graphql
PublishedApr 3, 2025
First seenApr 3, 2025
Weakness typeCWE-696CWE-696

How to fix

Update
  • api-platform/graphql4.0.22, 3.4.17, 4.1.5 or later
  • api-platform/core4.0.22, 3.4.17, 4.1.5 or later

Affected products

ProductAffected versionsFixed in
api-platform/graphqlPackagist4.0.0-alpha.1 ≤ v < 4.0.22, v < 3.4.17, 4.1.0-alpha.1 ≤ v < 4.1.54.0.22, 3.4.17, 4.1.5
api-platform/corePackagist4.0.0-alpha.1 ≤ v < 4.0.22, v < 3.4.17, 4.1.0-alpha.1 ≤ v < 4.1.54.0.22, 3.4.17, 4.1.5

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.