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·28 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 10 hours ago•CVE-2026-12243
7.5

CVE-2026-12243: Incomplete Path Traversal Validation and Percent-Encoding Bypass in NLTK

CVE-2026-12243 is a path traversal vulnerability in the Natural Language Toolkit (NLTK) version 3.9.4. The flaw exists because the input validation routine fails to account for percent-encoded directory traversal sequences like '..%2f' before passing them to urllib.request.url2pathname(), which decodes them into active traversal sequences.

Amit Schendel
Amit Schendel
3 views•8 min read
•about 11 hours ago•CVE-2026-73654
8.5

CVE-2026-73654: Prototype Pollution in Trigger.dev leading to Cascading Denial of Service

CVE-2026-73654 is a high-severity prototype pollution vulnerability in Trigger.dev. The flaw occurs during the handling of run-metadata updates through the PUT /api/v1/runs/:runId/metadata endpoint. Because user-supplied keys are parsed directly by the @jsonhero/path library without sanitization, an authenticated attacker with low privileges can pollute the global Object.prototype. This causes database queries via Prisma ORM to fail validation and induces unhandled exceptions in the Prometheus metrics client, resulting in a process-wide denial of service.

Alon Barad
Alon Barad
8 views•6 min read
•about 13 hours ago•CVE-2026-73559
6.5

CVE-2026-73559: Uncontrolled Resource Consumption in vLLM API completions

CVE-2026-73559 is an uncontrolled resource consumption vulnerability in the vLLM engine, specifically within the /v1/completions API endpoint, allowing authenticated attackers to cause application-level denial of service via unbounded prompt arrays.

Amit Schendel
Amit Schendel
8 views•5 min read
•about 15 hours ago•CVE-2026-54526
9.9

CVE-2026-54526: Strict Template Referencing Bypass and Privilege Escalation in Argo Workflows

A critical security bypass vulnerability in Argo Workflows allows authenticated attackers with workflow submission privileges to bypass 'Strict' or 'Secure' template referencing restrictions. By injecting unvalidated fields into the nested ArtifactGC configuration, attackers can execute arbitrary pod patches, leading to host namespace escape and cluster-wide privilege escalation.

Alon Barad
Alon Barad
12 views•6 min read
•about 16 hours ago•CVE-2026-54249
6.8

CVE-2026-54249: Server-Side Request Forgery via Confused Deputy in Pydantic AI UI Adapters

A Server-Side Request Forgery (SSRF) / Confused Deputy vulnerability has been identified in Pydantic AI UI Adapters (such as VercelAIAdapter). Under certain conditions, a malicious client can supply manipulated message history with provider metadata that forces the server to resolve files within privileged cloud environments (AWS S3, Google Cloud Storage) or model providers. This occurs because the adapters deserialize client-provided metadata structures directly into UploadedFile instances without validation, which are subsequently fetched using high-privilege server credentials.

Alon Barad
Alon Barad
6 views•7 min read
•about 17 hours ago•GHSA-RM43-82J9-R4MJ
8.2

GHSA-RM43-82J9-R4MJ: Path Traversal (Arbitrary File Read) in atomic-agents-stack Dashboard

A path traversal vulnerability in the optional dashboard server of atomic-agents-stack before version 1.1.0 allows unauthenticated remote attackers to read arbitrary files from the host filesystem.

Amit Schendel
Amit Schendel
5 views•6 min read