CVE-2025-31485
HIGH 7.5CVSS 3.1GraphQL grant on a property might be cached with different objects
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.
- Published
- 3 Apr 2025
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-696
- Also known as
- GHSA-428q-q3vv-3fq3
- Sources
- NVDJSONOSV GHSA-428q-q3vv-3fq3JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | Packagist | api-platform/graphql | >= 4.0.0-alpha.1, < 4.0.22 | 4.0.22 |
| OSV | Packagist | api-platform/core | >= 4.0.0-alpha.1, < 4.0.22 | 4.0.22 |
| OSV | Packagist | api-platform/graphql | < 3.4.17 | 3.4.17 |
| OSV | Packagist | api-platform/core | < 3.4.17 | 3.4.17 |
| OSV | Packagist | api-platform/core | >= 4.1.0-alpha.1, < 4.1.5 | 4.1.5 |
| OSV | Packagist | api-platform/graphql | >= 4.1.0-alpha.1, < 4.1.5 | 4.1.5 |
References
- https://github.com/api-platform/core/commit/7af65aad13037d7649348ee3dcd88e084ef771f8 · WEB
- https://github.com/api-platform/core/commit/cba3acfbd517763cf320167250c5bed6d569696a · WEB
- https://github.com/api-platform/core/releases/tag/v3.4.17 · WEB
- https://github.com/api-platform/core/security/advisories/GHSA-428q-q3vv-3fq3 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-31485 · ADVISORY
- https://github.com/FriendsOfPHP/security-advisories/blob/master/api-platform/core/CVE-2025-31485.yaml · WEB
- https://github.com/FriendsOfPHP/security-advisories/blob/master/api-platform/graphql/CVE-2025-31485.yaml · WEB
- https://github.com/api-platform/core · PACKAGE
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 3 Apr 2025)
- 25 Nov 2026 20:15 UTC · OSV: first stored (published 4 Apr 2025)