{"answers":{"affected":"6 open source packages ship an affected version, including api-platform/core.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54164 exists.","fix":"Upgrade api-platform/core to a fixed version for your release line: 4.1.30, 4.2.26 or 4.3.12.","what":"CVE-2026-54164 is a medium-severity vulnerability in api-platform core, published on 1 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-54164 and fix it if it is affected.\n\nWhat it is: CVE-2026-54164 is a medium-severity vulnerability in api-platform core, published on 1 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54164 exists.\n\nAffected packages and fixed versions:\n- api-platform/core (Packagist): affected all versions; fixed in 4.1.30\n- api-platform/core (Packagist): affected all versions; fixed in 4.1.30\n- api-platform/core (Packagist): affected from 4.2.0; fixed in 4.2.26\n- api-platform/core (Packagist): affected from 4.2.0; fixed in 4.2.26\n- api-platform/core (Packagist): affected from 4.3.0; fixed in 4.3.12\n- api-platform/core (Packagist): affected from 4.3.0; fixed in 4.3.12\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-54164/ (Markdown: https://insights.sbomify.com/CVE-2026-54164/index.md)","id":"CVE-2026-54164","markdown":"https://insights.sbomify.com/CVE-2026-54164/index.md","name":"CVE-2026-54164","record":{"aliases":["GHSA-9rjg-x2p2-h68h"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"API Platform Core","requires_auth":"low_privilege","summary":"Attackers can corrupt data invariants by assigning wrong resource types to relations in API Platform Core via type confusion.","user_interaction":"not_required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-843","name":"Access of Resource Using Incompatible Type"}],"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.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"API Platform Core: Missing IRI type check enables resource type confusion","id":"CVE-2026-54164","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"other","year":"2026"},"n_packages":6,"n_references":1,"next":{"headline":"Stored DOM-XSS in public shared-folder image gallery (one-click, unauthenticated victim)","id":"CVE-2026-54165"},"packages":[{"ecosystem":"Packagist","fixed":["4.1.30"],"introduced":["0"],"last_affected":[],"package":"api-platform/core","purl":null,"source":"GHSA-9rjg-x2p2-h68h"},{"ecosystem":"Packagist","fixed":["4.1.30"],"introduced":["0"],"last_affected":[],"package":"api-platform/core","purl":"pkg:composer/api-platform/core","source":"GHSA-9rjg-x2p2-h68h"},{"ecosystem":"Packagist","fixed":["4.2.26"],"introduced":["4.2.0"],"last_affected":[],"package":"api-platform/core","purl":null,"source":"GHSA-9rjg-x2p2-h68h"},{"ecosystem":"Packagist","fixed":["4.2.26"],"introduced":["4.2.0"],"last_affected":[],"package":"api-platform/core","purl":"pkg:composer/api-platform/core","source":"GHSA-9rjg-x2p2-h68h"},{"ecosystem":"Packagist","fixed":["4.3.12"],"introduced":["4.3.0"],"last_affected":[],"package":"api-platform/core","purl":null,"source":"GHSA-9rjg-x2p2-h68h"},{"ecosystem":"Packagist","fixed":["4.3.12"],"introduced":["4.3.0"],"last_affected":[],"package":"api-platform/core","purl":"pkg:composer/api-platform/core","source":"GHSA-9rjg-x2p2-h68h"}],"prev":{"headline":"secure_headers: CSP directive injection via sandbox, plugin_types, and report_to when given untrusted input","id":"CVE-2026-54163"},"products":["core"],"published":"2026-07-01","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-07-02","vendors":["api-platform"]},"summary":"Attackers can corrupt data invariants by assigning wrong resource types to relations in API Platform Core via type confusion.","url":"https://insights.sbomify.com/CVE-2026-54164/"}