🔍 CVE-2026-57171

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

🇰🇷 한글 설명

Compliance-trestle의 특정 명령어가 출력 경로에 대한 경로 탐색(Path Traversal) 검증을 수행하지 않아, 공격자가 임의의 파일 경로에 파일을 작성할 수 있는 취약점입니다. 특히 --force-overwrite 옵션 사용 시 공격자가 지정한 디렉토리 트리를 삭제할 수 있어 데이터 파괴 및 간접적인 코드 실행이 가능합니다.

💡 쉬운 설명

프로그램이 파일을 저장할 때 정해진 폴더가 아닌 엉뚱한 곳에 파일을 만들거나 기존 파일을 지울 수 있는 보안 결함입니다. 이를 통해 해커가 중요한 시스템 파일을 망가뜨리거나 악성 코드를 심을 수 있습니다.

🇺🇸 원문 (English)

Compliance-trestle (Trestle) is a Python SDK and command-line tool for managing OSCAL compliance documents. In versions before 3.12.4 and versions 4.0.0 through 4.0.3, the catalog-generate, profile-generate, and ssp-generate author commands write generated Markdown to an attacker-influenced output path without path-traversal validation, allowing arbitrary file write outside the Trestle workspace. These commands join the user-supplied output argument onto the Trestle root and write to the result, but guard it only with an is_directory_name_allowed() task-name-collision check rather than the PathSecurityValidator.validate_local_path() guard used by the jinja command, so an absolute path or one containing traversal sequences escapes the workspace and writes files under an attacker-chosen location as the invoking process owner. The security boundary is crossed when a trusted CI job, shared service, or wrapper derives the output argument from repository-controlled, tenant-controlled, or otherwise untrusted data while expecting output to stay inside the workspace. When --force-overwrite is used, the selected output directory is first recursively deleted, extending the primitive to destruction of an attacker-chosen directory tree and enabling indirect code execution by overwriting files a pipeline later runs. This issue is fixed in versions 3.12.4 and 4.1.0.

📍 영향받는 시스템

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

⚔️ 공격 벡터

신뢰할 수 없는 데이터로부터 유도된 출력 경로 인자를 통해 경로 탐색 공격 수행

🛡️ 대응 방법

Compliance-trestle를 3.12.4 또는 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:N/UI:N/S:U/C:N/I:H/A:H

💻 영향받는 소프트웨어

Python