Impact
This vulnerability is a server-side template injection in the Compliance-Trestle SDK that occurs when the custom Jinja2 tags mdsection_include or md_clean_include re-parse a markdown file as a template. Because the environment used is a standard Jinja2 Environment rather than a SandboxedEnvironment, the template is compiled and executed with full privileges. An attacker who can supply arbitrary content for an OSCAL control statement or component description, which is then written into a markdown file by Trestle, can embed Jinja2 syntax that will be evaluated, resulting in arbitrary code execution on the system running Trestle.
Affected Systems
The affected product is Compliance-Trestle, a Python SDK and command-line tool for OSCAL compliance documents developed by oscal-compass. Versions earlier than 3.12.4 and 4.0.0 through 4.0.3 contain the vulnerable custom Jinja2 tags. The issue is resolved in 4.1.0. No other versions are currently identified as vulnerable.
Risk and Exploitability
Based on the description, the vulnerability can be exploited when an attacker can supply or influence an OSCAL control statement, part prose, or component description that is then processed by Trestle. This typically requires local access or integration into a system that accepts user-supplied OSCAL data, making it a moderate to high risk vulnerability with a CVSS score of 7.8 and no available EPSS data. It is not yet listed in CISA’s Known Exploited Vulnerabilities catalog.
OpenCVE Enrichment