Executive brief
Compliance-trestle, a tool used to manage compliance artifacts, is vulnerable to a security flaw that allows attackers to execute malicious commands. By including specially crafted text in data files like System Security Plans (SSPs), an attacker can take control of the system running the tool, such as an automated build server or a developer's workstation. This could lead to the theft of sensitive data or a complete compromise of the environment where compliance documents are generated.
Technical details
A Server-Side Template Injection (SSTI) vulnerability exists in the 'trestle author jinja' command of compliance-trestle. The root cause is the recursive re-rendering of template output in 'trestle/core/commands/author/jinja.py' using a non-sandboxed Jinja2 environment. If a trusted template renders attacker-controlled data (such as an OSCAL SSP document or Lookup Table) containing Jinja2 expressions, those expressions are evaluated as code in subsequent recursion passes. An attacker can exploit this to achieve arbitrary command execution with the privileges of the process. The vulnerability is patched in versions 3.12.2 and 4.0.3.
Affected products
- oscal-compass compliance-trestle <= 3.12.1, >= 4.0.0, < 4.0.3
Timeline
- 2026-05-27: disclosed
- 2026-05-28: advisory: GitHub Advisory GHSA-gg2g-p7xc-qqmm published
- 2026-05-28: patched