{"vulnerability": "ghsa-mr95-65j8-9mxp", "sightings": [{"uuid": "33f2d4c0-e4fd-4778-8ab9-5fa842ec0735", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "9f56dd64-161d-43a6-b9c3-555944290a09", "vulnerability": "GHSA-mr95-65j8-9mxp", "type": "seen", "source": "https://gist.github.com/alon710/8415d76253b3ac6e1a3724ce264e4569", "content": "# CVE-2026-57170: CVE-2026-57170: Server-Side Template Injection Bypass in Compliance-Trestle Include Tags\n\n&gt; **CVSS Score:** 7.8\n&gt; **Published:** 2026-09-24\n&gt; **Full Report:** https://cvereports.com/reports/CVE-2026-57170\n\n## Summary\nCompliance-trestle is vulnerable to Server-Side Template Injection (SSTI) leading to arbitrary code execution due to an incomplete fix for CVE-2026-46439. While the original remediation removed recursive template rendering in the core system, custom include extensions ('mdsection_include' and 'md_clean_include') continued to compile and parse files via a standard, non-sandboxed Jinja2 environment. This allows attackers who can inject template expressions into OSCAL documents or markdown files to execute arbitrary python code when the custom template processing is executed. The issue has been patched in versions 4.1.0 and 3.12.4.\n\n## TL;DR\nAn incomplete security patch for CVE-2026-46439 in compliance-trestle allowed attackers to execute arbitrary shell commands via Server-Side Template Injection (SSTI) by placing payloads inside customized template include tags. It was remediated by applying a SandboxedEnvironment and neutralizing delimiters.\n\n## Exploit Status: POC\n\n## Technical Details\n\n- **CWE ID**: CWE-1336 / CWE-94\n- **Attack Vector**: Local (AV:L)\n- **CVSS Score**: 7.8 (High)\n- **EPSS Score**: 0.00235\n- **EPSS Percentile**: 12.82%\n- **Exploit Status**: poc\n- **KEV Status**: Not Listed\n\n## Affected Systems\n\n- compliance-trestle toolchain\n- NIST OSCAL documentation building environments\n- Automated compliance validation platforms using python-trestle\n- **compliance-trestle**: &lt; 3.12.4 (Fixed in: `3.12.4`)\n- **compliance-trestle**: &gt;= 4.0.0, &lt; 4.1.0 (Fixed in: `4.1.0`)\n\n## Mitigation\n\n- Upgrade compliance-trestle dependencies to patched versions (4.1.0 or 3.12.4)\n- Implement strict branch protection rules with review gates blocking commits with raw Jinja2 delimiters in OSCAL documents\n- Run documentation assembly processes within isolated sandboxed build environments with restricted local system permissions and minimal network access\n\n**Remediation Steps:**\n1. Audit local python development environments and virtual environments using 'pip list | grep compliance-trestle'\n2. Update project requirements files, lockfiles, or pyproject.toml configurations to restrict versions to &gt;= 4.1.0 or &gt;= 3.12.4\n3. Execute 'pip install --upgrade compliance-trestle' within the production and runner environments\n4. Verify build pipelines run without containing environment variable tokens in contexts accessible to documentation building blocks\n\n## References\n\n- [GitHub Security Advisory GHSA-mr95-65j8-9mxp](https://github.com/oscal-compass/compliance-trestle/security/advisories/GHSA-mr95-65j8-9mxp)\n- [NVD CVE-2026-57170 Details](https://nvd.nist.gov/vuln/detail/CVE-2026-57170)\n- [CVE Global Record](https://www.cve.org/CVERecord?id=CVE-2026-57170)\n\n\n---\n*Generated by [CVEReports](https://cvereports.com/reports/CVE-2026-57170) - Automated Vulnerability Intelligence*", "creation_timestamp": "2026-09-25T04:30:34.000000Z"}]}