CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-49858

CVE-2026-49858: Cross-User Attribute and Relation Leak in API Platform Core Serializers

Alon Barad
Alon Barad
Software Engineer

Jul 10, 2026·7 min read·37 visits

Executive Summary (TL;DR)

Unsafe in-memory caching in API Platform Core's JSON:API and HAL normalizers leaks sensitive properties across different user contexts when running under persistent PHP environments like FrankenPHP or RoadRunner.

CVE-2026-49858 is a vulnerability in API Platform Core's JSON:API and HAL item normalizers where conditionally secured attributes are cached globally in memory. When deployed in long-running PHP execution environments such as FrankenPHP worker mode, Swoole, or RoadRunner, this persistent caching bypasses property-level security constraints, allowing unprivileged users to access sensitive, unauthorized fields cached during privileged requests.

Vulnerability Overview

API Platform Core is a highly extensible framework built on top of the Symfony ecosystem designed to build modern API-driven projects. The framework includes specialized serializers for industry-standard formats such as HAL and JSON:API. These serializers use custom normalizer classes to map internal PHP entity structures into correctly formatted payload responses. To control data exposure dynamically, developers can utilize property-level security declarations that evaluate authorization logic during the serialization process.

The dynamic evaluation of authorization rules introduces computational overhead. To optimize performance, the framework implements an in-memory caching mechanism that stores the calculated structural representation of normalized resources. The vulnerability lies within this caching optimization layer, specifically within the HAL and JSON:API item normalizers. When property-level security constraints are applied to a resource, the serializer fails to validate whether the calculated cache key is safe for multi-user contexts.

The impact of this design flaw is realized when the application is hosted on modern, persistent PHP application servers. In traditional CGI or PHP-FPM architectures, the entire in-memory state is flushed at the end of each HTTP request, neutralizing the risk of cross-user cache leakage. However, under long-running runtimes like FrankenPHP in worker mode, RoadRunner, Swoole, or ReactPHP, the memory state persists across thousands of independent HTTP requests. This persistence allows a cached resource structure generated during a privileged request to be served directly to subsequent, unauthorized users.

Root Cause Analysis

The root cause of the vulnerability is the unsafe reuse of the computed structure cache in the ItemNormalizer classes for HAL and JSON:API. Specifically, ApiPlatform\JsonApi\Serializer\ItemNormalizer and ApiPlatform\Hal\Serializer\ItemNormalizer maintain an internal class property called componentsCache. This cache maps the resource structural components (attributes, relationships, and links) to specific format contexts using a key derived from $context['cache_key'].

In vulnerable versions of the framework, the normalizers unconditionally generated and applied the cache key using the getCacheKey() method from CacheKeyTrait. The generation process did not evaluate whether the target resource class declared property-level security attributes, such as #[ApiProperty(security: 'is_granted("ROLE_ADMIN")')]. Because this key was treated as safe by default, any request targeting the resource would resolve to the same cache slot regardless of the requester's security scope.

When a highly privileged user, such as an administrator, requests a resource, the serializer evaluates the security expressions on each property. Since the admin is authorized, the restricted attributes are validated, and the resulting structure is stored inside the componentsCache property. When a subsequent request is processed by the same worker thread on behalf of an unprivileged user, the normalizer checks the componentsCache using the generic cache key. Because the cache key matches, the normalizer returns the cached administrative representation directly, bypassing all property-level security evaluations.

Code-Level Analysis and Security Patch

To resolve this security vulnerability, the maintainers integrated the isCacheKeySafe verification mechanism into the serialization process of both the JSON:API and HAL serializers. This mechanism analyzes the target resource class to detect any properties configured with dynamic security constraints. If any security annotation or attribute is detected, the caching mechanism is disabled for that entire resource class, preventing cross-user pollution.

// In src/Serializer/AbstractItemNormalizer.php (Base class modification)
 
/**
 * Check if any property contains a security grant, which makes the cache key not safe,
 * as allowed_properties can differ for two instances of the same object.
 */
protected function isCacheKeySafe(array $context): bool
{
    if (!isset($context['resource_class']) || !$this->resourceClassResolver->isResourceClass($context['resource_class'])) {
        return false;
    }
 
    $resourceClass = $this->resourceClassResolver->getResourceClass(null, $context['resource_class']);
    if (isset($this->safeCacheKeysCache[$resourceClass])) {
        return $this->safeCacheKeysCache[$resourceClass];
    }
 
    $options = $this->getFactoryOptions($context);
    $propertyNames = $this->propertyNameCollectionFactory->create($resourceClass, $options);
 
    $this->safeCacheKeysCache[$resourceClass] = true;
    foreach ($propertyNames as $propertyName) {
        $propertyMetadata = $this->propertyMetadataFactory->create($resourceClass, $propertyName, $options);
        if (null !== $propertyMetadata->getSecurity()) {
            // Disables caching if a single property has a dynamic security policy
            $this->safeCacheKeysCache[$resourceClass] = false;
            break;
        }
    }
 
    return $this->safeCacheKeysCache[$resourceClass];
}

The ItemNormalizer implementation for JSON:API was updated to call this gate before assigning the cache key. A similar modification was introduced to the HAL ItemNormalizer. The code below shows the comparison between the vulnerable and patched cache key assignment:

// In src/JsonApi/Serializer/ItemNormalizer.php
 
         if (!isset($context['cache_key'])) {
-            $context['cache_key'] = $this->getCacheKey($format, $context);
+            $context['cache_key'] = $this->isCacheKeySafe($context) ? $this->getCacheKey($format, $context) : false;
         }
// In src/Hal/Serializer/ItemNormalizer.php
 
         if (!isset($context['cache_key'])) {
-            $context['cache_key'] = $this->getCacheKey($format, $context);
+            $context['cache_key'] = $this->isCacheKeySafe($context) ? $this->getCacheKey($format, $context) : false;
         }

By setting $context['cache_key'] to false, the caching layer is bypassed entirely during the serialization workflow. This ensures that the dynamic security constraints are evaluated dynamically on each subsequent request. The fix is complete and robust because it shifts the default state to non-cached whenever security attributes are present on any field of the target class.

Exploitation and Attack Path

Exploiting this vulnerability relies on the behavior of persistent PHP workers. The attacker does not need to submit custom payload parameters. Instead, they exploit the synchronization state of the application's persistent runtime. This behavior is illustrated in the sequence diagram below:

To perform the attack, an unauthorized user first identifies target endpoints that utilize the HAL or JSON:API format representation. They look for endpoints that expose standard user profiles, financial information, or administrative metadata. The attacker must target systems deployed under runtimes like FrankenPHP worker mode, Swoole, or RoadRunner where worker threads are reused across requests.

The attacker then waits for or triggers an administrative request to the target resource. When the administrator's request is handled by a specific worker, the cache is populated with the complete resource model, including the protected properties. The attacker sends rapid, successive requests to the same endpoint. When one of these requests lands on the populated worker process, the system serves the cached structure, revealing the administrator-only properties to the attacker.

Impact and Severity Assessment

The security impact of CVE-2026-49858 is primarily a high-severity confidentiality breach. Although the vulnerability does not allow an attacker to write, modify, or delete database elements, it grants direct access to restricted properties. Depending on the application schema, this may result in the exposure of personally identifiable information (PII), API tokens, system credentials, or internal configuration values.

The CVSS v3.1 base score is calculated at 5.9 (Medium severity). The attack complexity is rated as High (AC:H) because successful exploitation depends on external factors. Specifically, the system must run on a persistent worker framework, and the attacker must execute their request on the same worker process that handled a privileged request before the cache expires or the process restarts.

Because the vulnerability does not affect the host operating system directly or allow binary code execution, the impact scope is Unchanged (S:U). The integrity (I) and availability (A) ratings are both None (N). However, the high confidentiality rating means that targeted attacks against administrative endpoints present a critical data leak risk.

Remediation and Defenses

The primary remediation strategy is upgrading the api-platform/core package to a patched release. Ensure that your composer dependency constraints resolve to one of the following safe versions: >= 4.1.29, >= 4.2.26, or >= 4.3.12. Running composer update api-platform/core within your deployment pipeline will apply the patch.

If upgrading immediately is not possible, the caching vector can be disabled by switching off the persistent execution models of your PHP web server. Configuring FrankenPHP to run in standard request mode instead of worker mode prevents process memory from persisting across HTTP requests. Similarly, using classic PHP-FPM instead of Swoole or RoadRunner completely mitigates this vulnerability.

Alternatively, developers can implement a custom context builder to globally disable the cache key generation for affected formats. By registering a custom serializer context builder, you can intercept the serialization request and force the cache_key parameter to false for HAL and JSON:API requests. This configuration forces the normalizer to execute dynamic property security checks on every individual request at the cost of slight performance overhead.

Official Patches

API PlatformSecurity advisory for cross-user attribute and relation leak vulnerability

Fix Analysis (2)

Technical Appendix

CVSS Score
5.9/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS Probability
0.20%
Top 90% most exploited

Affected Systems

API Platform Coreapi-platform/coreapi-platform/halapi-platform/json-api

Affected Versions Detail

Product
Affected Versions
Fixed Version
api-platform/core
API Platform
>= 4.1.0, < 4.1.294.1.29
api-platform/core
API Platform
>= 4.2.0, < 4.2.264.2.26
api-platform/core
API Platform
>= 4.3.0, < 4.3.124.3.12
AttributeDetail
CWE IDCWE-524
Attack VectorNetwork (AV:N)
CVSS v3.15.9 (Medium)
EPSS Score0.00197
ImpactHigh Confidentiality Exposure
Exploit StatusNone (No public exploit or PoC)
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1119Automated Collection
Collection
T1555Credentials from Web Browsers / Web Stores
Credential Access
T1563Subvert Active Sessions
Defense Evasion
CWE-524
Use of Cache Containing Sensitive Information

The product uses a cache that contains sensitive information, but it does not adequately prevent unauthorized access to that information.

Vulnerability Timeline

Initial branch functional testing and test suite migrations executed.
2026-05-11
Vulnerability fixed in source repository by introducing isCacheKeySafe validation to HAL and JSON:API normalizers.
2026-05-25
Static analysis improvements and package dependency updates committed.
2026-05-26
Vulnerability public disclosure and CVE-2026-49858 published.
2026-07-01

References & Sources

  • [1]GHSA-pjhx-3c3w-9v23 Security Advisory
  • [2]CVE-2026-49858 authoritative CVE Record
  • [3]NVD - CVE-2026-49858 Detailed Report
  • [4]Fix Git Commit for ItemNormalizers Cache Key Gating

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 11 hours ago•CVE-2026-14669
8.8

CVE-2026-14669: PostgreSQL to_char() Timezone Abbreviation Heap-Based Buffer Overflow

CVE-2026-14669 is a critical heap-based buffer overflow vulnerability in PostgreSQL's date/time formatting function to_char(timestamptz). The flaw arises from unsafe copying of user-controlled timezone abbreviations into a fixed-size internal buffer. An authenticated database user can trigger this issue by setting a long POSIX timezone abbreviation containing custom formatting, allowing them to overwrite adjacent heap structures and hijack execution control to achieve remote code execution (RCE) with the privileges of the 'postgres' operating system user.

Alon Barad
Alon Barad
8 views•6 min read
•2 days ago•CVE-2026-63462
7.5

CVE-2026-63462: Unauthenticated Stack Overflow Denial of Service in Unleash Server

An unauthenticated remote denial of service vulnerability exists in the Unleash feature management platform. By submitting a crafted JSON payload containing deeply nested structures to an OpenAPI-validated endpoint, an attacker can trigger uncontrolled recursion within the error formatting module. This leads to a call-stack exhaustion (RangeError: Maximum call stack size exceeded) inside the Node.js runtime, causing the service to crash immediately without recovery.

Alon Barad
Alon Barad
11 views•6 min read
•2 days ago•CVE-2026-63004
5.5

CVE-2026-63004: Server-Side Request Forgery in Unleash Addon and Integration Subsystem

CVE-2026-63004 is a server-side request forgery (SSRF) vulnerability in the Unleash feature management platform. Authenticated administrators with CREATE_ADDON or UPDATE_ADDON privileges can exploit this vulnerability to initiate requests to loopback addresses, private networks, and cloud metadata endpoints, potentially leading to information disclosure and credential extraction.

Amit Schendel
Amit Schendel
9 views•8 min read
•2 days ago•CVE-2026-63466
4.1

CVE-2026-63466: Process-Wide Security Degradation via Global Module Mutation in Unleash

Prior to version 8.0.3, Unleash's Markdown event formatter directly mutated the global template-escaping function of the shared mustache Node.js module, resulting in a process-wide security degradation where HTML/Markdown escaping was permanently disabled for the application lifetime.

Alon Barad
Alon Barad
3 views•6 min read
•2 days ago•CVE-2026-76904
9.8

CVE-2026-76904: Unauthenticated SQL Injection in GeoTools PostGIS DataStore Component

A critical SQL injection vulnerability exists in the GeoTools open-source Java library. This vulnerability is situated within the post-processing phase of OGC Filter conversion inside the PostGIS DataStore module. Specifically, the `jsonArrayContains` function does not validate or sanitize its arguments before constructing PostgreSQL SQL/JSON path evaluation queries. An unauthenticated remote attacker can exploit this weakness by submitting crafted filters via standard OGC services like WFS or WMS to execute arbitrary SQL commands on the underlying database system.

Alon Barad
Alon Barad
15 views•5 min read
•2 days ago•CVE-2026-61824
8.2

CVE-2026-61824: High-Severity Cross-Site Scripting (XSS) via Unsanitized Site Extractors in Defuddle

CVE-2026-61824 is a high-severity Cross-Site Scripting (XSS) vulnerability in kepano/defuddle before version 0.19.1. Custom site extractors for platforms such as X/Twitter, Substack, and YouTube constructed HTML representations via template string interpolation without output escaping. This allowed malicious pages to bypass standard parser sanitization routines and execute arbitrary JavaScript.

Amit Schendel
Amit Schendel
8 views•7 min read