CVE-2026-49858: API Platform Core information disclosure in JSON:API and HAL normalizers

CVE-2026-49858 · Severity: medium · CVSS 5.9 · Published 2026-07-01

API Platform, a framework for building web APIs, contains a flaw where sensitive data fields might be leaked to unauthorized users. This occurs because the system incorrectly reuses cached data structures between different users' requests when using JSON:API or HAL formats. In certain high-performance server environments, a lower-privileged user could see the structure of data that should have been hidden by security rules.

Technologies: api-platform/core (Packagist). Vendors: Packagist.

Quick answers

Is CVE-2026-49858 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-49858 being exploited in the wild.
How severe is CVE-2026-49858?
Medium severity, with a CVSS score of 5.9, published 1 July 2026.
Which products and versions are affected?
API Platform HAL >= 4.0.0, < 4.1.29; >= 4.2.0, < 4.2.25; >= 4.3.0, < 4.3.8; API Platform JSON-API >= 4.0.0, < 4.1.29; >= 4.2.0, < 4.2.25; >= 4.3.0, < 4.3.8; api-platform/core (Packagist) ECOSYSTEM:introduced=2.6.0,fixed=4.1.29; api-platform/hal (Packagist) ECOSYSTEM:introduced=4.0.0,fixed=4.1.29; and 1 more.
Is there a fix for CVE-2026-49858?
Yes. api-platform/core (Packagist): upgrade to 4.1.29 or later; api-platform/hal (Packagist): upgrade to 4.1.29 or later; api-platform/json-api (Packagist): upgrade to 4.1.29 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-49858 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-49858?
Check whether you run API Platform HAL, API Platform JSON-API, api-platform/core (Packagist) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • api-platform/core (Packagist): upgrade to 4.1.29 or later
    composer require api-platform/core:^4.1.29
  • api-platform/hal (Packagist): upgrade to 4.1.29 or later
    composer require api-platform/hal:^4.1.29
  • api-platform/json-api (Packagist): upgrade to 4.1.29 or later
    composer require api-platform/json-api:^4.1.29

Technical details

The vulnerability exists in the ItemNormalizer for JSON:API and HAL formats within API Platform Core. The `componentsCache` arrays are keyed on `$context['cache_key']` without verifying if the cache key is safe for the current security context (missing `isCacheKeySafe` gate). Consequently, if a high-privileged user triggers a resource normalization, the resulting structure—including restricted attributes—is cached and may be served to a subsequent low-privileged user. This is primarily exploitable in long-running PHP runtimes (e.g., FrankenPHP, RoadRunner, Swoole) where the normalizer instance persists across requests. Patches are available in versions 4.1.29, 4.2.25, and 4.3.8.

Affected products

  • api-platform core >= 2.6.0, < 4.1.29; >= 4.2.0, < 4.2.25; >= 4.3.0, < 4.3.8
  • api-platform json-api >= 4.0.0, < 4.1.29; >= 4.2.0, < 4.2.25; >= 4.3.0, < 4.3.8
  • api-platform hal >= 4.0.0, < 4.1.29; >= 4.2.0, < 4.2.25; >= 4.3.0, < 4.3.8

Identifiers

  • CVE-2026-49858
  • GHSA-pjhx-3c3w-9v23

Timeline

  • 2026-06-04: disclosed
  • 2026-07-01: advisory: NVD publication date
  • 2026-07-10: advisory: GitHub Advisory published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.