Skip to main content

Compliance-Trestle CVE-2026-57170

| EUVDEUVD-2026-66211 HIGH
Code Injection (CWE-94)
2026-08-25 GitHub_M GHSA-mr95-65j8-9mxp
7.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply Jinja2 syntax in OSCAL prose field
  2. Delivery
    OSCAL data written verbatim into included Markdown file
  3. Exploit
    Operator invokes trestle template render
  4. Execution
    mdsection_include or md_clean_include re-parses file via unsandboxed Parser
  5. Persist
    Jinja2 evaluates Python gadget chain
  6. Impact
    Arbitrary code executes as trestle process user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the target is running compliance-trestle in an affected version (prior to 3.12.4, or 4.0.0 through 4.0.3); (2) a Jinja2 template in the rendering workflow uses the mdsection_include or md_clean_include custom include tags - templates that do not use these tags are not vulnerable; and (3) an attacker can influence the content of an OSCAL prose field - specifically control statements, part prose, or component description fields - that is written verbatim into a Markdown file included by those tags. OSCAL parameter table fields are explicitly NOT vulnerable because Trestle applies delimiter neutralization to them. The CVSS vector (PR:L, AV:L) indicates that the attacker requires low-privilege local access or the ability to supply malicious OSCAL source data to the rendering pipeline; they do not need OS-level privileges but do need write access to the OSCAL content consumed by trestle. Default installations processing only fully internal, trusted OSCAL content are not exposed without an insider or supply-chain threat vector.

Impact

The CVSS 3.1 score of 7.8 with vector AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H accurately reflects the attack surface: exploitation requires local access and low-privilege control over OSCAL input data, not remote unauthenticated reach. EPSS data is absent from the provided intelligence, so exploitation probability cannot be quantified numerically. The vulnerability is not listed in the CISA KEV catalog, and no standalone public exploit code has been identified - only security test payloads in the upstream fix commit, which confirms the mechanism but does not constitute weaponized tooling. The combination of high CIA impact (H/H/H) and low exploitation complexity (AC:L, PR:L) makes this a genuine priority for any organization running compliance automation pipelines that ingest third-party or community-contributed OSCAL content; the local attack vector limits opportunistic mass exploitation but does not reduce risk in supply-chain or shared-repository scenarios where OSCAL catalogs or component definitions are sourced from external contributors. Organizations should treat the severity as operationally higher than the local vector might suggest when external OSCAL data is in scope.

Exploit ScenarioDerived

An attacker with write access to a shared OSCAL component definition repository (for example, via a pull request or a compromised upstream catalog) embeds Jinja2 template syntax such as {{ ''.__class__.__mro__[1].__subclasses__()[N]('id',shell=True,stdout=-1).communicate()[0] }} in a component description field. When an operator on an affected Trestle version runs a template rendering command that uses mdsection_include or md_clean_include on a Markdown file derived from that OSCAL data, the malicious expression is re-parsed in the unsandboxed Jinja2 environment and executes arbitrary shell commands with the privileges of the trestle process. Security test payloads demonstrating this exact gadget chain are present in the upstream fix commit.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 public PoC Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 26, 2026

Server-side template injection in Compliance-Trestle's custom Jinja2 include tags (mdsection_include and md_clean_include) allows a low-privileged local attacker to achieve arbitrary code execution when attacker-controlled OSCAL data containing Jinja2 syntax is processed during template rendering. All versions prior to 3.12.4 and the 4.0.0-4.0.3 line are affected; the fix is version 4.1.0. No CISA KEV listing or standalone public exploit has been identified at time of analysis, though security test payloads demonstrating the RCE gadget chain are present in the upstream fix commits.

RemediationAI

Upgrade Compliance-Trestle to version 4.1.0, which replaces the plain jinja2.Environment with jinja2.sandbox.SandboxedEnvironment in the affected include tags, preventing arbitrary attribute traversal during Markdown re-parsing. The upstream fix commits are available at https://github.com/oscal-compass/compliance-trestle/commit/0f82d19bd42f9cc0f1b3acd7fc3f6dafe3b6ae10 and https://github.com/oscal-compass/compliance-trestle/commit/5335ff873a2a68eb7de43df029bea09cadff22fd; however, a released patched version (4.1.0) is confirmed by the advisory and should be used rather than cherry-picking commits. If an immediate upgrade is not feasible, the most effective compensating control is to restrict OSCAL ingestion to fully trusted, internally controlled sources only - do not process third-party or community-provided OSCAL catalogs, profiles, or component definitions until the patch is applied. Alternatively, disabling the mdsection_include and md_clean_include tags in any Jinja2 templates that process externally sourced Markdown eliminates the injection point, though this will break template rendering workflows that depend on those tags.

Affected VersionsENISA

compliance-trestle < 3.12.4
compliance-trestle 4.0.0, < 4.1.0

Affected Packages

pypi compliance-trestle fix: 3.12.4, 4.1.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Compliance-Trestle (CPE: cpe:2.3:a:oscal-compass:compliance-trestle) is a Python SDK and CLI for authoring and managing OSCAL (Open Security Controls Assessment Language) compliance documents. The root cause (CWE-94: Code Injection) resides in trestle/core/jinja/tags.py, where the MDSectionInclude and MDCleanInclude custom Jinja2 extension tags call Parser(self.environment, ...).parse() to splice included Markdown file content directly into the host template's compilation AST. Because self.environment is a plain jinja2.Environment rather than jinja2.sandbox.SandboxedEnvironment, any Jinja2 expressions embedded in the included file execute with unrestricted access to Python's full object model, enabling the classic SSTI gadget chain (e.g., ''.__class__.__mro__[1].__subclasses__()) to reach os.system or subprocess. Critically, Trestle's Markdown writers emit OSCAL prose fields - control statements, part prose, component descriptions - verbatim, applying delimiter neutralization only to parameter tables, so attacker-influenced OSCAL field content flows unmodified into included Markdown files and is re-parsed as executable template code.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Attacker must supply malicious OSCAL data processed locally with low-privilege access (AV:L, PR:L); no special conditions or user interaction needed; full RCE yields C/I/A:H with unchanged scope.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat 7.8 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Sep 24, 2026 - 21:03 EUVD
CVE Published
Aug 25, 2026 - 23:18 cve.org
HIGH 7.8

DescriptionCVE.org

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.

Latest POC

1 public PoC link from github

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

Compliance-Trestle versions prior to 4.1.0 contain a template injection vulnerability allowing local attackers with low system privileges to execute arbitrary code by embedding malicious Jinja2 syntax in OSCAL compliance data. This threatens the integrity of compliance documentation and audit trails, with potential for unauthorized modification of compliance records or lateral movement within systems processing this data.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 90% exploitable
Prevalence
Low
niche OSCAL compliance automation SDK, limited to government/FedRAMP-adjacent teams
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

59
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy