{"id":"CVE-2026-54164","published":"2026-07-01T19:14:28Z","modified":"2026-07-02T15:50:25Z","title":"API Platform Core: Missing IRI type check enables resource type confusion","vendor":"api-platform","product":"core","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00336,"percentile":0.1944,"provenance":"source"},"cwes":[{"id":"CWE-843","name":"Access of Resource Using Incompatible Type"}],"references":[{"url":"https://github.com/api-platform/core/security/advisories/GHSA-9rjg-x2p2-h68h","tags":["x_refsource_CONFIRM"]}],"priority":{"score":8.4,"factors":[{"name":"EPSS percentile","points":3.89},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"api-platform","affectedVersions":[{"vendor":"api-platform","product":"core","versions":["< 4.1.30",">= 4.2.0, < 4.2.26",">= 4.3.0, < 4.3.12"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-02T15:50:13.142519Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"api-platform/core","vulnerableRanges":["<4.1.30",">=4.2.0, <4.2.26",">=4.3.0, <4.3.12"],"patched":["4.1.30","4.2.26","4.3.12"],"from":["GHSA-9rjg-x2p2-h68h"],"provenance":"source"}],"summary":{"text":"The flaw is a missing type check in the serializer's AbstractItemNormalizer within API Platform Core, where relation IRIs are resolved without validating that the returned resource matches the relation's declared type, enabling type confusion. An attacker who holds low-privilege authentication and can send write requests (POST, PUT, or PATCH) to an endpoint with writable relations can supply an IRI pointing to a resource of a different type, which is silently assigned to untyped relation properties and can corrupt data integrity; typed properties block the substitution.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:03:47Z"},"euvd":{"id":"EUVD-2026-41126","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-api-platform-core-cve-2023-25575","parents":[{"from":"CVE-2023-25575","to":"CVE-2026-54164","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/Serializer/AbstractItemNormalizer.php"],"commits":["https://github.com/api-platform/core/commit/5723d68369722feefeb11e42528d9580db5dd0fb","https://github.com/api-platform/core/commit/6bcbeb2dbee53db5bb9b4b8e343bffdf7732de1e"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2025-31481","published":"2025-04-03","fixed":"4.1.5","kev":false},{"cve":"CVE-2025-31485","published":"2025-04-03","fixed":"4.1.5","kev":false},{"cve":"CVE-2026-49858","published":"2026-07-01","fixed":"4.3.8","kev":false,"link":{"from":"CVE-2026-49858","to":"CVE-2026-54164","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:api-platform/core","fromFixed":"4.1.29","toFixed":"4.1.30","daysApart":0}]}},{"cve":"CVE-2026-54164","published":"2026-07-01","fixed":"4.3.12","kev":false}],"package":"Packagist:api-platform/core"}}