Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply Jinja2 syntax in OSCAL prose field
-
DeliveryOSCAL data written verbatim into included Markdown file
-
ExploitOperator invokes trestle template render
-
Executionmdsection_include or md_clean_include re-parses file via unsandboxed Parser
-
PersistJinja2 evaluates Python gadget chain
-
ImpactArbitrary 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 |
| 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 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
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.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
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.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-66211
GHSA-mr95-65j8-9mxp
NVD
CVE.org
EPSS
Exploit-DB