{"id":"CVE-2026-61707","summary":"SOCFortress CoPilot: Stored case-report template injection permits backend code execution","details":"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.","aliases":["GHSA-7q83-228r-wfh5"],"modified":"2026-11-01T02:31:02.376941595Z","published":"2026-10-29T21:25:01.101Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-1336","CWE-862","CWE-94"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61707.json"},"references":[{"type":"WEB","url":"https://github.com/socfortress/CoPilot/tree/v0.1.76"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61707.json"},{"type":"ADVISORY","url":"https://github.com/socfortress/CoPilot/security/advisories/GHSA-7q83-228r-wfh5"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61707"},{"type":"FIX","url":"https://github.com/socfortress/CoPilot/commit/a5ed4a250094d1b6d15ba0ec088dbd773ab1b4e0"},{"type":"FIX","url":"https://github.com/socfortress/CoPilot/pull/936"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/socfortress/copilot","events":[{"introduced":"0"},{"fixed":"a31782e5791c0f7ce9e0e2faa80bc6a05a4a907b"},{"fixed":"a5ed4a250094d1b6d15ba0ec088dbd773ab1b4e0"}],"database_specific":{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StringRangeExpression","range":[{"introduced":"0"},{"fixed":"0.1.76"}]},{"range":[{"fixed":"a5ed4a250094d1b6d15ba0ec088dbd773ab1b4e0"}],"source":"REFERENCES_COMMIT"}]}}],"versions":["v0.1.75","v0.1.74","v0.1.73","v0.1.72","v0.1.71","v0.1.70","v0.1.69","v0.1.68","v0.1.67","v0.1.66","v0.1.65","v0.1.64","v0.1.63","v0.1.62","v0.1.61","v0.1.60","v0.1.59","v0.1.58","v0.1.57","v0.1.56","v0.1.55","v0.1.54","v0.1.53","v0.1.52","v0.1.51","v0.1.50","v0.1.49","v0.1.48","v0.1.47","v0.1.46","v0.1.45","v0.1.44","v0.1.43","v0.1.42","v0.1.41","v0.1.40","v0.1.39","v0.1.38","v0.1.37","v0.1.36","v0.1.35","v0.1.34","v0.1.33","v0.1.32","v0.1.31","v0.1.30","v0.1.29","v0.1.28","v0.1.27","v0.1.26","v0.1.25","v0.1.24","v0.1.23","v0.1.22","v0.1.21","v0.1.20","v0.1.19","v0.1.18","v0.1.17","v0.1.16","v0.1.15","v0.1.14","v0.1.13","v0.1.12","v0.1.11","v0.1.10","v0.1.9","v0.1.8","v.0.1.8","v0.1.7","v0.1.6","v0.1.5","v0.1.4","v0.1.3","v0.1.2","v0.1.1","v0.1.0","v0.0.9","v0.0.8","v0.0.7","v0.0.6","v0.0.5","v0.0.4","v0.0.3","v0.0.2","v0.0.1"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-61707.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H"}]}