Vulnerability · Published Apr 3, 2025 · Assigned by GitHub_M

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

High 7.5

In plain English

A high-severity security flaw in core from api-platform. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.6%top 49.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Packagistapi-platform/core4.0.22GHSA-428q-q3vv-3fq3
Packagistapi-platform/core3.4.17GHSA-428q-q3vv-3fq3
Packagistapi-platform/core4.1.5GHSA-428q-q3vv-3fq3
Packagistapi-platform/graphql4.0.22GHSA-428q-q3vv-3fq3
Packagistapi-platform/graphql3.4.17GHSA-428q-q3vv-3fq3
Packagistapi-platform/graphql4.1.5GHSA-428q-q3vv-3fq3

Affected products (as reported)

VendorProductVersions
api-platform core >= 4.0.0-alpha.1, < 4.0.22< 3.4.17

Weakness: CWE-696 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References