Junglewise Threat Intelligence

CVE-2026-57170: Compliance-trestle server-side template injection in Jinja2 tags

CVE-2026-57170 · Severity: high · CVSS 7.8 · Published 2026-08-26

Technologies: OSCAL Compass Compliance-Trestle.

Executive brief

Compliance-trestle is a Python tool for managing OSCAL compliance documents that uses Jinja2 templating. The tool's custom Markdown include tags fail to properly sanitize attacker-controlled content, allowing an attacker to inject malicious template code that executes with full system permissions. This can lead to arbitrary code execution when compliance documents containing malicious code are processed.

Technical details

The vulnerability is a server-side template injection (SSTI) in the MDSectionInclude and MDCleanInclude custom Jinja2 tags located in Trestle/core/jinja/tags.py. These tags re-parse included Markdown file content as Jinja2 template code using a plain jinja2.Environment instead of a SandboxedEnvironment, providing access to the full SSTI gadget chain. Attacker-controlled OSCAL data (control statements, component descriptions, prose fields) containing Jinja2 syntax is emitted verbatim into Markdown files without proper neutralization, then executed when the include tags re-parse the content. The vulnerability affects versions prior to 3.12.4 and 4.0.0 through 4.0.3, with no authentication or special network access required—only the ability to supply malicious OSCAL compliance data. The fix is available in version 4.1.0.

Affected products

  • OSCAL Compass Compliance-trestle before 3.12.4, 4.0.0 through 4.0.3

Timeline

  • 2026-08-26: disclosed
  • 2026-08-03: patched: Fix released in version 4.1.0

References