🇰🇷 한글 설명
SOCFortress CoPilot 0.1.76 이전 버전에서 customer_user 권한의 사용자가 업로드한 케이스 보고서 템플릿이 샌드박스 없는 Jinja2 엔진에서 실행되어 서버 명령 실행(root)이 가능합니다. 템플릿 저장소가 고객 단위로 분리되어 있지 않아 다른 테넌트의 데이터와 커넥터 자격증명이 노출될 수 있으며, HTML/PDF 렌더러를 통해 로컬 파일 읽기와 내부 서비스 요청(SSRF)도 가능합니다.
💡 쉬운 설명
가장 낮은 권한의 고객 계정으로도 보고서 템플릿에 악성 코드를 심어 서버를 장악할 수 있습니다. 이로 인해 모든 고객의 보안 사고 데이터와 저장된 접속 정보가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
SOCFortress CoPilot focuses on providing a single pane of glass for all your security operations needs. Prior to 0.1.76, in the reported deployment, case-report templates uploaded by `customer_user`, the lowest-privilege portal role, are later executed by non-sandboxed Jinja2 engines when an admin or analyst generates a report. The `/case-report-template/upload` route in `backend/app/incidents/routes/db_operations.py` validates only the filename-derived MIME type, not the template content. Templates share a global store without customer_code scoping, and `customer_user` can also list, download and delete them, allowing an attacker to replace a legitimate default template under the same name. In `backend/app/incidents/services/reports.py`, `render_document_with_context` uses `DocxTemplate` without a sandbox; in `backend/app/incidents/services/reports_pdf.py`, `render_html_template` uses a non-sandboxed `Environment` without autoescaping. Normal privileged requests to `POST /api/incidents/report/generate-report-docx` or `/generate-report-pdf` therefore evaluate attacker-controlled Jinja expressions as Python on the backend. The reported deployment executes commands as root, exposing all tenants' incident and SIEM data and stored connector credentials. The HTML/PDF wkhtmltopdf renderer additionally permits local-file reads and requests to internal services. This issue is fixed in version 0.1.76.
📍 영향받는 시스템
SOCFortress CoPilot 0.1.76 미만 버전
⚔️ 공격 벡터
customer_user 계정으로 악성 Jinja2 표현식이 포함된 보고서 템플릿을 업로드한 뒤, 관리자/분석가가 보고서를 생성할 때 서버에서 임의 코드가 실행됨
🛡️ 대응 방법
SOCFortress CoPilot을 0.1.76 이상으로 업데이트하고, 기존 업로드된 템플릿을 검토 후 신뢰할 수 없는 항목은 삭제
🔧 검증 코드
출력된 버전이 0.1.76 미만이면 취약하며, 0.1.76 이상이면 패치가 적용된 것입니다. 명령어 결과가 없으면 설치 경로를 직접 확인해야 합니다.
pip show socfortress-copilot 2>/dev/null | grep -i version || cat /app/VERSION 2>/dev/null || docker exec copilot-backend cat /app/VERSION 2>/dev/null
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
💻 영향받는 소프트웨어
Cisco Identity Services Engine