CVE-2026-49858API Platform Core: Cross-user attribute leak in JSON:API and HAL item normalizers due to…
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
Fixed builds are available from Packagist: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Packagist library | api-platform/core | Fixed | 4.3.8 | GHSA-pjhx-3c3w-9v23 |
| Packagist library | api-platform/hal | Fixed | 4.2.25 | GHSA-pjhx-3c3w-9v23 |
| Packagist library | api-platform/json-api | Fixed | 4.3.8 | GHSA-pjhx-3c3w-9v23 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- api-platform core: affected: >= 2.6.0, < 4.1.29, >= 4.2.0, < 4.2.25, >= 4.3.0, < 4.3.8
- api-platform/hal: affected: >= 2.6.0, < 4.1.29, >= 4.2.0, < 4.2.25, >= 4.3.0, < 4.3.8
- api-platform/json-api: affected: >= 2.6.0, < 4.1.29, >= 4.2.0, < 4.2.25, >= 4.3.0, < 4.3.8
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.