🔍 CVE-2026-71291

8.8
CVSS Score
HIGH
2026-08-05
2026-08-05 16:17
✅ 완료

🇰🇷 한글 설명

Bolt CMS에서 Twig 템플릿 엔진을 사용할 때 샌드박스 확장 기능이 적용되지 않아 발생하는 취약점입니다. 공격자가 특정 권한을 가진 경우 Twig 페이로드를 삽입하여 웹 서버 권한으로 임의의 OS 명령어를 실행할 수 있는 원격 코드 실행(RCE)이 가능합니다.

💡 쉬운 설명

웹사이트 관리 도구의 설정 오류로 인해, 글을 쓰는 사람이 악성 코드를 숨겨 넣으면 서버 전체를 조종할 수 있는 보안 구멍이 발견되었습니다. 이를 통해 해커가 서버에 명령을 내려 파일을 삭제하거나 정보를 빼낼 수 있습니다.

🇺🇸 원문 (English)

Bolt CMS renders content field values through Twig's full application-level Environment with no SandboxExtension registered anywhere in the codebase. In src/Entity/Field.php, getTwigValue() calls shouldBeRenderedAsTwig(), which gates rendering only on the field definition's allow_twig flag and a regex checking for `{{`, `{%`, or `{#`; when true, the raw field value is compiled and rendered via `self::getTwig()->createTemplate($value)->render(['record' => $this->getContent()])` with no sandboxing. Bolt's own bundled config/bolt/contenttypes.yaml sets `allow_twig: true` on the default "pages" contenttype's content field out of the box. Any user with edit access to that content type (a standard editor role, not just an administrator) can inject a Twig payload such as `{{ ['id']|map('passthru')|join }}` that executes arbitrary OS commands when the content is saved and rendered, achieving remote code execution as the web server user.

📍 영향받는 시스템

Bolt CMS (allow_twig 설정이 true로 활성화된 버전)

⚔️ 공격 벡터

콘텐츠 편집 권한을 가진 사용자가 Twig 문법을 이용한 악성 페이로드를 콘텐츠 필드에 삽입하여 실행

🛡️ 대응 방법

Twig 샌드박스 확장을 적용하도록 패치하거나, 콘텐츠 타입 설정에서 allow_twig 옵션을 false로 변경

🔧 검증 코드

명령어 결과에 allow_twig: true가 포함되어 있다면 해당 콘텐츠 타입에 대해 Twig 주입 공격이 가능할 수 있음을 의미합니다.

Shell / Script
grep -r "allow_twig: true" config/bolt/contenttypes.yaml

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

UniFi OS Server