Vulnerability in api-platform/core (CVE-2026-54164)
Summary
Vulnerability in api-platform/core (CVE-2026-54164). Data can be tampered with by attackers. Exploitable via AbstractItemNormalizer. Mitigation: upgrade to 4.3.12 or later.
Original description
The description as published by the source.
Summary
The API Platform 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.
Impact
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.
Affected versions
api-platform/core< 4.1.30api-platform/core>= 4.2.0, < 4.2.26api-platform/core>= 4.3.0, < 4.3.12
Older major series (2.x, 3.x) ship the same vulnerable code path and are end-of-life; no fix is planned.
Patched versions
4.1.304.2.264.3.12
Fix
An is_a guard is added inside AbstractItemNormalizer::getResourceFromIri() (and the equivalent inline call sites on 4.1) so that a mismatched IRI throws InvalidArgumentException, mirroring the ope…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-54164 has been found in api-platform/core.
Attackers can target a specific entry point like AbstractItemNormalizer over the network to misuse the product.
Data can be tampered with by attackers. CVSS score: 6.5/10.
What to do: upgrade api-platform/core to 4.3.12 or later.
If unsure, ask your IT team or search "api-platform/core CVE-2026-54164" on the vendor's site.
CVE-2026-54164 (api-platform/core) — CWE-843 / CVSS v3 6.5
Attack vector: remote (network-reachable) / no user interaction
Attack surface: AbstractItemNormalizer / is_a / InvalidTypeException / InvalidArgumentException
Patched: 4.3.12 — apply immediately
Workaround: Declare a PHP type on every writable relation property (e.g.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
A vulnerability (CWE-843) exists in api-platform/core. Attackers reach the vulnerable code path via AbstractItemNormalizer.
Check the vendor advisory for the affected versions of api-platform/core. Attack surface: AbstractItemNormalizer / is_a / InvalidTypeException / InvalidArgumentException.
Severity: Medium (CVSS 6.5/10). Data can be tampered with by attackers.
Update to 4.3.12.
Workaround: Declare a PHP type on every writable relation property (e.g.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'api-platform/core' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'api-platform/core' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
api-platform/coreを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
Declare a PHP type on every writable relation property (e.g.パッチが適用されるまでの応急処置として、Declare a PHP type on every writable relation property (e.g. を実施。回避策の副作用 (機能低下) を確認した上で。
-
3Apply patch patch
Upgrade api-platform/core to 4.3.12ステージング環境で 4.3.12 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com