🇰🇷 한글 설명
Strapi 헤드리스 CMS의 Content-Type Builder 쓰기 API에서 데이터베이스 쿼리 인젝션 취약점이 발견되었습니다. 인증된 관리자가 column.defaultTo 속성에 raw 옵션을 지정하면 검증 없이 Knex의 raw 쿼리로 전달되어 임의의 DB 구문 실행이 가능합니다. 4.26.1 및 5.33.2 버전에서 해당 API는 개발 모드에서만 허용되도록 제한되었습니다.
💡 쉬운 설명
Strapi라는 웹 콘텐츠 관리 도구에서 관리자 권한을 가진 사용자가 데이터베이스에 임의의 명령을 실행할 수 있는 취약점입니다. 운영 환경에서 해당 기능이 차단되도록 패치가 적용되었습니다.
🇺🇸 원문 (English)
Strapi is an open source headless content management system. In versions on the 4.x branch prior to 4.26.1 and on the 5.x branch prior to 5.33.2, a database-query injection vulnerability existed in the Strapi Content-Type Builder write API. An authenticated administrator could inject arbitrary database statements through the `column.defaultTo` attribute when creating or modifying a content type. Setting `defaultTo` as a tuple `[value, { isRaw: true }]` caused the value to be passed directly into Knex's `db.connection.raw()` during schema migration without sanitization, allowing arbitrary statement execution at the database layer. Depending on the database engine, this enabled arbitrary file read via database utility functions, denial of service via forced server crash on schema-migration error, and on engines that permit external program execution, remote code execution against the database server. The patch in versions 4.26.1 and 5.33.2 addresses this by restricting all Content-Type Builder write APIs to development mode only. Production deployments running v5.33.2 or later return 404 for requests against `/content-type-builder/content-types` and related endpoints, removing the network-reachable attack surface entirely.
📍 영향받는 시스템
Strapi 4.x 4.26.1 미만, Strapi 5.x 5.33.2 미만
⚔️ 공격 벡터
인증된 관리자가 Content-Type Builder API에서 defaultTo를 [값, {isRaw: true}] 형태로 설정해 임의 DB 구문을 실행
🛡️ 대응 방법
Strapi를 4.26.1 이상 또는 5.33.2 이상으로 업데이트하고, 운영 환경에서 Content-Type Builder API 접근을 차단
🔧 검증 코드
출력된 버전이 4.26.1 이상(4.x 브랜치) 또는 5.33.2 이상(5.x 브랜치)이면 패치된 상태이며, 그보다 낮으면 취약합니다.
npm ls @strapi/strapi 2>/dev/null | grep strapi