🔍 CVE-2026-54164

6.5
CVSS Score
MEDIUM
2026-07-01
2026-07-02 17:54
✅ 완료

🇰🇷 한글 설명

API Platform Core의 AbstractItemNormalizer에서 관계 IRI를 해석할 때 리소스 타입을 검증하지 않아 발생하는 타입 혼동(Type Confusion) 취약점입니다. 공격자가 쓰기 요청을 통해 선언된 클래스와 다른 타입의 리소스를 관계 속성에 할당함으로써 시스템의 불변성을 깨뜨리고 후속 로직에 오류를 유발할 수 있습니다.

💡 쉬운 설명

API 시스템이 데이터의 종류를 제대로 확인하지 않아, 엉뚱한 종류의 데이터를 끼워 넣을 수 있는 문제입니다. 이로 인해 시스템 내부 데이터가 꼬이거나 예상치 못한 동작이 발생할 수 있습니다.

🇺🇸 원문 (English)

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.

📍 영향받는 시스템

API Platform Core 4.1.30 미만, 4.2.26 미만, 4.3.12 미만 버전

⚔️ 공격 벡터

쓰기 권한(POST/PUT/PATCH)이 있는 엔드포인트에 선언된 타입과 다른 리소스의 IRI를 전송

🛡️ 대응 방법

API Platform Core를 4.1.30, 4.2.26 또는 4.3.12 이상의 최신 버전으로 업데이트

🔧 검증 코드

출력된 버전이 취약점이 해결된 버전(4.1.30, 4.2.26, 4.3.12 이상)인지 확인합니다.

Shell / Script
composer show api-platform/core | grep 'versions'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

💻 영향받는 소프트웨어

PHP