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

Medium 5.9 Published Updated

Attackers can view hidden API attributes by exploiting cache key collisions in JSON:API and HAL normalizers, leaking sensitive data across users.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-49858?

CVE-2026-49858 is a medium-severity vulnerability in api-platform/hal, published on 1 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-639, CWE-524

Which versions are affected by CVE-2026-49858?

18 open source packages ship an affected version, including api-platform/hal, api-platform/core and api-platform/json-api.

PackageAffectedFixed in
api-platform/hal PackagistFrom 4.0.04.1.29
api-platform/hal PackagistFrom 4.0.04.1.29
api-platform/hal PackagistFrom 4.2.04.2.25
api-platform/hal PackagistFrom 4.2.04.2.25
api-platform/hal PackagistFrom 4.3.04.3.8
api-platform/hal PackagistFrom 4.3.04.3.8
12 more packages
api-platform/core PackagistFrom 2.6.04.1.29
api-platform/core PackagistFrom 2.6.04.1.29
api-platform/core PackagistFrom 4.2.04.2.25
api-platform/core PackagistFrom 4.2.04.2.25
api-platform/core PackagistFrom 4.3.04.3.8
api-platform/core PackagistFrom 4.3.04.3.8
api-platform/json-api PackagistFrom 4.0.04.1.29
api-platform/json-api PackagistFrom 4.0.04.1.29
api-platform/json-api PackagistFrom 4.2.04.2.25
api-platform/json-api PackagistFrom 4.2.04.2.25
api-platform/json-api PackagistFrom 4.3.04.3.8
api-platform/json-api PackagistFrom 4.3.04.3.8

How do I fix CVE-2026-49858?

Upgrade api-platform/hal to a fixed version for your release line: 4.1.29, 4.2.25 or 4.3.8.

Is CVE-2026-49858 being exploited?

There is no known exploitation of CVE-2026-49858 in the wild and no public exploit code.

Sources

Also known as GHSA-pjhx-3c3w-9v23.

Is CVE-2026-49858 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free