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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.9
- **CVSS:** 5.9 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-524, CWE-639
- **Aliases:** GHSA-pjhx-3c3w-9v23
- **Published:** 2026-07-01T19:24:58.170Z
- **Modified:** 2026-07-10T14:46:38.913Z

## Who should check

- Projects that depend on Packagist package api-platform/core (\>= 2.6.0, \< 4.1.29)
- Projects that depend on Packagist package api-platform/json-api (\>= 4.0.0, \< 4.1.29)
- Projects that depend on Packagist package api-platform/hal (\>= 4.0.0, \< 4.1.29)
- Anyone running api-platform core \>= 2.6.0, \< 4.1.29; \>= 4.2.0, \< 4.2.25; \>= 4.3.0, \< 4.3.8
- Anyone running api-platform/hal \>= 2.6.0, \< 4.1.29; \>= 4.2.0, \< 4.2.25; \>= 4.3.0, \< 4.3.8
- Anyone running api-platform/json-api \>= 2.6.0, \< 4.1.29; \>= 4.2.0, \< 4.2.25; \>= 4.3.0, \< 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.

## Affected and fixed versions

- Packagist `api-platform/core`: affected \>= 2.6.0, \< 4.1.29; fixed 4.1.29, 4.2.25, 4.3.8 (osv)
- Packagist `api-platform/json-api`: affected \>= 4.0.0, \< 4.1.29; fixed 4.1.29, 4.2.25, 4.3.8 (osv)
- Packagist `api-platform/hal`: affected \>= 4.0.0, \< 4.1.29; fixed 4.1.29, 4.2.25, 4.3.8 (osv)
- api-platform core: \>= 2.6.0, \< 4.1.29; \>= 4.2.0, \< 4.2.25; \>= 4.3.0, \< 4.3.8 (cvelist)
- api-platform/hal: \>= 2.6.0, \< 4.1.29; \>= 4.2.0, \< 4.2.25; \>= 4.3.0, \< 4.3.8 (cvelist)
- api-platform/json-api: \>= 2.6.0, \< 4.1.29; \>= 4.2.0, \< 4.2.25; \>= 4.3.0, \< 4.3.8 (cvelist)

## Mitigation

- Upgrade api-platform/core to one of 4.1.29, 4.2.25, 4.3.8 (or later in the same release line).
- Upgrade api-platform/json-api to one of 4.1.29, 4.2.25, 4.3.8 (or later in the same release line).
- Upgrade api-platform/hal to one of 4.1.29, 4.2.25, 4.3.8 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-49858. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-49858.md
Affected: api-platform/core >= 2.6.0, < 4.1.29; api-platform/json-api >= 4.0.0, < 4.1.29; api-platform/hal >= 4.0.0, < 4.1.29
Fixed in: 4.1.29, 4.2.25, 4.3.8

Steps:
1. Search this machine and project for api-platform/core (Packagist), api-platform/json-api (Packagist), api-platform/hal (Packagist), api-platform core, api-platform/hal, api-platform/json-api: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-49858 being exploited?

There is no confirmed exploitation: CVE-2026-49858 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-49858?

Medium: CVSS 5.9 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-49858?

api-platform/core \>= 2.6.0, \< 4.1.29; api-platform/json-api \>= 4.0.0, \< 4.1.29; api-platform/hal \>= 4.0.0, \< 4.1.29.

### Is there a fix for CVE-2026-49858?

Yes. Fixed in 4.1.29, 4.2.25, 4.3.8. Upgrade api-platform/core to one of 4.1.29, 4.2.25, 4.3.8 (or later in the same release line). Upgrade api-platform/json-api to one of 4.1.29, 4.2.25, 4.3.8 (or later in the same release line). Upgrade api-platform/hal to one of 4.1.29, 4.2.25, 4.3.8 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-49858?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/api-platform/core/security/advisories/GHSA-pjhx-3c3w-9v23>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-49858>
- other: <https://github.com/api-platform/core>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-49858>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-pjhx-3c3w-9v23> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-49858> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-49858>
