CVE-2026-57170
Received Received - Intake

Server-Side Template Injection in Trestle

Vulnerability report for CVE-2026-57170, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-26

Last updated on: 2026-08-26

Assigner: GitHub, Inc.

Description

Compliance-trestle (Trestle) is a Python SDK and command-line tool for managing OSCAL compliance documents. In versions prior to 3.12.4 and 4.0.0 through 4.0.3, the custom Jinja2 include tags mdsection_include and md_clean_include re-parse the content of an included Markdown file as Jinja2 template code in a non-sandboxed environment, allowing server-side template injection that can lead to arbitrary code execution. The MDSectionInclude and MDCleanInclude tags in Trestle/core/jinja/tags.py pass included file content to Parser(self.environment, ...).parse(), splicing it into the host template's compilation, and the environment is a plain jinja2.Environment rather than a SandboxedEnvironment, so any expressions in the file are evaluated with full access to the usual SSTI gadget chain. Because Trestle's Markdown writers emit OSCAL prose and component-description fields verbatim, applying delimiter neutralization only to parameter tables, attacker-controlled OSCAL data such as a control statement, part prose, or component description containing Jinja2 syntax flows into an included Markdown file and is executed when the include tag re-parses it. This issue is fixed in version 4.1.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-26
Last Modified
2026-08-26
Generated
2026-08-26
AI Q&A
2026-08-26
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
trestle compliance-trestle to 4.0.3 (inc)
trestle compliance-trestle 4.1.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
CWE-1336 The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a Server-Side Template Injection (SSTI) flaw in Compliance-trestle, a Python SDK for managing OSCAL compliance documents. It affects versions before 3.12.4 and 4.0.0 through 4.0.3. The issue occurs because custom Jinja2 include tags re-parse included Markdown files as executable template code in a non-sandboxed environment. Attacker-controlled OSCAL data containing Jinja2 syntax can execute arbitrary code when processed by these tags.

Detection Guidance

To detect this vulnerability, check the version of compliance-trestle installed on your system. Run: pip show compliance-trestle. If the version is below 3.12.4 or between 4.0.0 and 4.0.3, the system is vulnerable.

Impact Analysis

An attacker could exploit this to execute arbitrary code on your system with the privileges of the Trestle process. This could lead to data theft, system compromise, or disruption of compliance document generation. The attack requires crafted OSCAL content in automated pipelines like CI/CD.

Compliance Impact

This vulnerability could compromise the integrity of compliance documents, potentially leading to false reporting of controls. If exploited, it may result in non-compliance with standards like GDPR or HIPAA due to unauthorized code execution and data access. Organizations using affected versions risk regulatory violations.

Mitigation Strategies

Immediately upgrade compliance-trestle to version 4.1.0 or later. If upgrading is not possible, apply the security patches from the official repository commits (0f82d19 or 5335ff8) to neutralize Jinja2 delimiters in markdown content.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-57170. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart