Auth bypass in Api-Platform Api-Platform/hal
CVE-2026-49858
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.
EPSS: 0.002 (11.2th percentile) — read the EPSS interpretation.
CVSS v3 metric
CVSS v3 base score 5.9 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
Affected products
- Api-platform Api-platform/hal — versions >= 2.6.0, < 4.1.29, >= 4.2.0, < 4.2.25, >= 4.3.0, < 4.3.8
- Api-platform Api-platform/json-api — versions >= 2.6.0, < 4.1.29, >= 4.2.0, < 4.2.25, >= 4.3.0, < 4.3.8
- Api-platform Core — versions >= 2.6.0, < 4.1.29, >= 4.2.0, < 4.2.25, >= 4.3.0, < 4.3.8
Weakness classification (CWE)
References
- security-advisories@github.com (x_refsource_CONFIRM)
Frequently asked questions
- What is CVE-2026-49858?
- CVE-2026-49858 is a medium-severity vulnerability in Api-Platform Api-Platform/hal, classified under Use of Cache Containing Sensitive Information. CVSS score: 5.9/10. Published 2026-07-01.
- How severe is CVE-2026-49858?
- Medium severity. CVSS v3 base score is 5.9 out of 10.