🔍 CVE-2026-57170

7.8
CVSS Score
HIGH
2026-08-26
2026-09-09 21:09
✅ 완료

🇰🇷 한글 설명

Compliance-trestle의 특정 Jinja2 커스텀 태그가 포함된 마크다운 파일을 샌드박스 없이 재파싱하여 서버 측 템플릿 주입(SSTI) 취약점이 발생합니다. 공격자가 제어 가능한 OSCAL 데이터에 Jinja2 구문을 포함할 경우 임의의 코드가 실행될 수 있습니다.

💡 쉬운 설명

문서 작성 도구가 외부 파일을 읽어올 때 보안 검사 없이 코드를 실행하는 문제가 있습니다. 이를 통해 해커가 시스템에 몰래 명령어를 입력하여 컴퓨터를 마음대로 조종할 수 있습니다.

🇺🇸 원문 (English)

Compliance-trestle (Trestle) is a Python SDK and command-line tool for managing OSCAL compliance documents. In versions prior to 3.12.4 and 4.0.0 through 4.0.3, the custom Jinja2 include tags mdsection_include and md_clean_include re-parse the content of an included Markdown file as Jinja2 template code in a non-sandboxed environment, allowing server-side template injection that can lead to arbitrary code execution. The MDSectionInclude and MDCleanInclude tags in Trestle/core/jinja/tags.py pass included file content to Parser(self.environment, ...).parse(), splicing it into the host template's compilation, and the environment is a plain jinja2.Environment rather than a SandboxedEnvironment, so any expressions in the file are evaluated with full access to the usual SSTI gadget chain. Because Trestle's Markdown writers emit OSCAL prose and component-description fields verbatim, applying delimiter neutralization only to parameter tables, attacker-controlled OSCAL data such as a control statement, part prose, or component description containing Jinja2 syntax flows into an included Markdown file and is executed when the include tag re-parses it. This issue is fixed in version 4.1.0.

📍 영향받는 시스템

Compliance-trestle 3.12.4 미만 버전 및 4.0.0 ~ 4.0.3 버전

⚔️ 공격 벡터

공격자가 조작된 Jinja2 구문이 포함된 OSCAL 데이터를 입력하여 템플릿 엔진을 통해 코드를 실행함

🛡️ 대응 방법

Compliance-trestle를 4.1.0 이상의 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 버전이 3.12.4 미만이거나 4.0.0에서 4.0.3 사이인지 확인하십시오.

Shell / Script
pip show trestle | grep Version

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

UniFi OS Server