🇰🇷 한글 설명
API Platform Core의 컬렉션 엔드포인트에서 보안 규칙이 첫 번째 항목에 대해서만 실행되고 결과가 캐싱되는 취약점입니다. 이로 인해 속성 값에 의존하는 보안 규칙이 무력화되어 권한이 없는 사용자에게 데이터가 노출되거나 반대로 권한이 있는 사용자의 데이터가 숨겨질 수 있습니다.
💡 쉬운 설명
데이터 목록을 불러올 때 첫 번째 데이터의 보안 검사 결과만 재사용하여 나머지 데이터의 보안을 확인하지 않는 문제입니다. 이로 인해 남에게 보여주면 안 되는 정보가 목록에 포함되어 유출될 위험이 있습니다.
🇺🇸 원문 (English)
API Platform Core is the server component of API Platform: hypermedia and GraphQL APIs. Resource properties secured with the `security` option of the `ApiPlatform\Metadata\ApiProperty` attribute can be disclosed to unauthorized users. The problem affects most serialization formats, including raw JSON, which is enabled by default when installing API Platform. Custom serialization formats may also be impacted. Only collection endpoints are affected by the issue, item endpoints are not. The JSON-LD format is not affected by the issue. The result of the security rule is only executed for the first item of the collection. The result of the rule is then cached and reused for the next items. This bug can leak data to unauthorized users when the rule depends on the value of a property of the item. This bug can also hide properties that should be displayed to authorized users. This issue impacts the 2.7, 3.0 and 3.1 branches. Please upgrade to versions 2.7.10, 3.0.12 or 3.1.3. As a workaround, replace the `cache_key` of the context array of the Serializer inside a custom normalizer that works on objects if the security option of the `ApiPlatform\Metadata\ApiProperty` attribute is used.
📍 영향받는 시스템
API Platform Core 2.7, 3.0, 3.1 버전 (JSON-LD 제외)
⚔️ 공격 벡터
컬렉션 엔드포인트 요청 시 첫 번째 항목의 보안 규칙 결과를 이용해 다른 항목의 비공개 데이터에 접근
🛡️ 대응 방법
API Platform을 2.7.10, 3.0.12 또는 3.1.3 이상의 버전으로 업그레이드하십시오.
🔧 검증 코드
출력된 버전이 2.7.10, 3.0.12, 3.1.3 미만인지 확인하여 취약 여부를 판단합니다.
composer show api-platform/core | grep versions