🇰🇷 한글 설명
Strapi 5.33.3 이전 버전의 Upload 플러그인 Content API 엔드포인트가 관리자가 설정한 MIME 타입 제한(allowedTypes, deniedTypes)을 적용하지 않습니다. 인증된 사용자가 HTML이나 SVG 같은 금지된 파일을 업로드할 수 있으며, 같은 출처에서 제공될 경우 관리자 세션 탈취로 이어질 수 있습니다. 5.33.3 버전에서 관리자 및 Content API 업로드 경로 모두에 동일한 보안 검사가 적용되도록 수정되었습니다.
💡 쉬운 설명
외부에서 허용되지 않은 위험한 파일을 올릴 수 있는 보안 결함입니다. 공격자가 이 파일을 관리자가 열면 관리자 권한을 가로챌 수 있습니다.
🇺🇸 원문 (English)
Strapi is an open source headless content management system. In Strapi versions prior to 5.33.3, the Upload plugin's Content API endpoints did not enforce the administrator-configured MIME type restrictions (`plugin.upload.security.allowedTypes` and `deniedTypes`). The same restrictions were correctly enforced on the Admin Panel upload path. The upload plugin's `enforceUploadSecurity` security check was invoked in the admin upload controller but was missing from the Content API controller. The Content API handlers `uploadFiles` and `replaceFile` (and the `upload` wrapper that dispatches to them) called the underlying upload service directly, bypassing both the magic-byte MIME detection and the configured allow/deny lists. An authenticated user with the Content API upload permission could therefore upload file types the administrator had explicitly disallowed, including HTML and SVG content. In deployments serving uploaded files from the same origin as the admin panel (default), an attacker could upload an HTML or SVG file that, when opened directly by an admin, executed JavaScript in the admin origin, enabling admin-session hijack and authenticated administrative actions against the admin API. The patch in version 5.33.3 introduces a shared `prepareUploadRequest` helper that wraps `enforceUploadSecurity` and is called from both the Content API and admin upload controllers, ensuring identical security policy enforcement on every upload entry point.
📍 영향받는 시스템
Strapi 5.33.3 미만 버전 (Upload 플러그인 사용 환경)
⚔️ 공격 벡터
Content API 업로드 권한을 가진 인증 사용자가 금지된 HTML/SVG 파일을 업로드하고, 관리자가 이를 열 때 스크립트가 실행되어 관리자 세션을 탈취
🛡️ 대응 방법
Strapi를 5.33.3 이상으로 업그레이드
🔧 검증 코드
출력된 버전이 5.33.3 미만이면 취약하므로 5.33.3 이상으로 업그레이드가 필요하며, 버전이 5.33.3 이상이면 패치가 적용된 상태입니다.
npm list @strapi/strapi 2>/dev/null | grep strapi