CVE-2026-54164 Details
Description
API Platform Core is a system to create hypermedia-driven REST and GraphQL APIs. In versions prior to 4.1.30, 4.2.26 and 4.3.12, the serializer's AbstractItemNormalizer does not validate the resource type returned when resolving relation IRIs, allowing type confusion where a resource of an unintended type can be silently assigned to a relation property. An attacker who can submit write requests (POST/PUT/PATCH) to an API Platform endpoint with writable relations can supply a relation IRI pointing to a resource of a different type than the relation's declared class. Because getResourceFromIri() does not pass an $operation to IriConverter::getResourceFromIri(), the is_a type guard at IriConverter.php:86 is skipped. For untyped relation properties (legacy @var-only style), the wrong-typed object is silently assigned, corrupting invariants and potentially feeding downstream logic that assumes the declared type (CWE-843). For typed properties (modern PHP 8.x), the substitution is blocked by Symfony's PropertyAccessor with an InvalidTypeException. This issue has been fixed in versions 4.1.30, 4.2.26 and 4.3.12.
A type confusion vulnerability has been identified in API Platform Core versions prior to 4.1.30, 4.2.26, and 4.3.12. The issue arises in the serializer's AbstractItemNormalizer, which fails to validate the resource type when resolving relation IRIs. This oversight allows a resource of an unintended type to be silently assigned to a relation property. An attacker capable of sending write requests to an API Platform endpoint with writable relations can exploit this by providing a relation IRI that points to a resource of a different type than what is declared. In untyped relation properties, this incorrect assignment can disrupt data integrity and potentially affect downstream processes that rely on the expected type. For typed properties in PHP 8.x, Symfony's PropertyAccessor blocks the substitution with an InvalidTypeException.
Upgrade to API Platform Core versions 4.1.30, 4.2.26, or 4.3.12. For a temporary workaround, declare a PHP type on every writable relation property, which will prompt Symfony's PropertyAccessor to reject any mismatched objects.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 1, 2026CISA-ADP
Assessed Jul 2, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/api-platform/core/security/advisories/GHSA-9rjg-x2p2-h68h | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/api-platform/core/security/advisories/GHSA-9rjg-x2p2-h68h | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-843 | Access of Resource Using Incompatible Type ('Type Confusion') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| API Platform Core | < 4.1.30 (semver) >= 4.2.0, < 4.2.26 (semver) >= 4.3.0, < 4.3.12 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 25, 2026 | CVE Translated | [email protected] |
| Jul 2, 2026 | CVE Modified | CISA-ADP |
| Jul 1, 2026 | New CVE Received | [email protected] |
Volerion