Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPlant malicious Jinja2 payload in Markdown/YAML
-
DeliveryUser imports artifact into Trestle workspace
-
ExploitUser invokes trestle render/author command
-
ExecutionMDCleanInclude re-parses content via non-sandboxed Environment
-
PersistTraverse Python object internals
-
ImpactExecute arbitrary OS commands 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 that a user run compliance-trestle against content containing injected Jinja2 expressions - specifically, content that passes through the MDCleanInclude or MDSectionInclude tag rendering pipeline. The three documented attacker-controlled input surfaces are: (1) a crafted workspace Markdown file (e.g., a system security plan section authored or modified by the attacker), (2) a third-party SSP document imported into a Trestle workspace, or (3) a YAML lookup-table value used during template rendering. The attacker does not need authenticated access to the target system - they only need their malicious content to be present in a workspace that a legitimate user processes. Exploitation is bounded by the requirement for user interaction (a human must invoke a Trestle command), and by the local attack vector (the malicious file must exist on the processing host before Trestle runs). Non-default configuration or network access is not required once the malicious content is in the workspace. Impact is scoped to the privileges of the Trestle process user - no privilege escalation or scope change is implied. |
| Impact | The CVSS 7.8 score with vector AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H reflects a realistic local-vector RCE: the attacker does not need system privileges but must get malicious content into a workspace that a user then processes with Trestle. The UI:R metric is the primary limiting factor - exploitation requires a human to invoke Trestle against the malicious input, which aligns with the described attack surfaces (imported SSP documents, third-party YAML lookup tables). No EPSS score was provided in the input data, so probabilistic exploitation risk cannot be quantified. There is no CISA KEV listing, and no standalone POC tool has been identified, though the security test suite committed alongside the fix demonstrates a working proof-of-concept payload pattern. The combination of AV:L and UI:R meaningfully limits opportunistic exploitation; however, supply-chain scenarios - where a compliance team imports a crafted third-party OSCAL document as part of routine workflow - represent a credible targeted attack path. The C:H/I:H/A:H impact metrics are appropriate given full OS command execution in the Trestle process context. |
| Exploit ScenarioDerived | An attacker embeds a Jinja2 RCE payload such as {{ ''.__class__.__mro__[1].__subclasses__()[X]('id',shell=True) }} inside a crafted OSCAL SSP Markdown file or YAML lookup-table value and distributes it as a third-party compliance artifact. A compliance engineer imports the document into a Trestle workspace and runs a standard trestle task or author command, triggering MDCleanInclude or MDSectionInclude to re-parse the Markdown through a non-sandboxed Jinja2 environment, executing the injected OS command as the engineer's local user. No public exploit tool has been identified, but the attack pattern is well-understood and the security test suite committed with the fix demonstrates the exact payload structure. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
Server-side template injection in compliance-trestle's custom Jinja2 tags enables remote code execution when the tool processes attacker-controlled Markdown or YAML content. Versions before 3.12.4 and the 4.0.x series through 4.0.3 are affected; the root flaw is that MDCleanInclude and MDSectionInclude re-parse included content using a non-sandboxed jinja2.Environment, allowing injected expressions to traverse Python object internals and invoke arbitrary OS commands as the Trestle process user. No public exploit or CISA KEV listing has been identified at time of analysis, but the attack surface is realistic in supply-chain workflows where users import third-party SSP or YAML documents.
RemediationAI
Upgrade compliance-trestle to version 3.12.4 (for environments on the 3.x branch) or version 4.1.0 (for environments on the 4.x branch); these are the vendor-confirmed fixed releases referenced in the GitHub security advisory at https://github.com/oscal-compass/compliance-trestle/security/advisories/GHSA-jw39-3688-r4rx and evidenced by commits 0f82d19bd42f9cc0f1b3acd7fc3f6dafe3b6ae10 and 5335ff873a2a68eb7de43df029bea09cadff22fd. If immediate upgrade is not possible, the most effective compensating control is to restrict Trestle to processing only internally authored or cryptographically verified Markdown and YAML inputs, and to avoid importing third-party SSP documents or YAML lookup tables from untrusted sources - this directly eliminates the attacker-controlled-content prerequisite. As a process-level control, running Trestle in a restricted container or under a low-privilege user limits the blast radius of any successful RCE. There is no known configuration toggle to disable the vulnerable Jinja2 tags individually without patching.
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 is a Python SDK and CLI built around the OSCAL (Open Security Controls Assessment Language) data model, widely used in FedRAMP and NIST compliance automation pipelines. The vulnerability is rooted in CWE-94 (Improper Control of Generation of Code), specifically in two custom Jinja2 extension tags - MDCleanInclude and MDSectionInclude - defined in trestle/core/jinja/ext.py. When these tags include external Markdown content into a template, they feed the raw included text back into a standard jinja2.Environment for re-parsing, instead of treating it as literal data. A standard Environment executes all Jinja2 expression syntax, including Python object traversal chains such as ''.__class__.__mro__[1].__subclasses__() that can escape into the Python runtime and call subprocess or os.system. The fix, confirmed in commits 0f82d19 and 5335ff8, migrates the re-parsing step to jinja2.sandbox.SandboxedEnvironment, which blocks attribute access to dangerous Python internals. The test file added in the fix (tags_security_test.py) references 'CVE-2026-46439 incomplete fix', indicating this is a second-generation patch addressing a prior incomplete sandbox remediation. No CPE string was provided in the input data.
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:N/UI:R/S:U/C:H/I:H/A:H
AV:L because malicious content must exist locally; PR:N as attacker needs no system privileges, only content delivery; UI:R because a user must invoke Trestle; full C/I/A impact from arbitrary OS command execution.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
Compliance-trestle (Trestle) is a Python SDK and command-line tool for managing OSCAL compliance documents. In versions before 3.12.4 and versions 4.0.0 through 4.0.3, Trestle is vulnerable to server-side template injection that can lead to remote code execution. This occurs because the MDCleanInclude and MDSectionInclude Jinja2 tags re-parse untrusted Markdown content as template source code using a non-sandboxed jinja2.Environment. An attacker who controls content that Trestle renders, such as a crafted workspace Markdown file, a third-party SSP document, or a YAML lookup-table value, can inject a Jinja2 expression that traverses Python object internals to execute arbitrary operating system commands in the context of the Trestle process. This issue is fixed in versions 3.12.4 and 4.1.0.
Executive ViewAI
Compliance-trestle, a NIST compliance documentation platform, contains a remote code execution vulnerability triggered when processing external compliance frameworks or YAML documents. Organizations that import compliance content from vendors, partners, or external repositories face potential compromise of their compliance infrastructure and systems that Trestle interacts with, creating operational and regulatory risk.
Disable or restrict Jinja2 template processing tags if operationally feasible; implement mandatory input validation and allowlisting for all external compliance documents; run Trestle processes with minimal operating system privileges and file system access; deploy Trestle in a sandboxed or containerized environment for untrusted content; implement network segmentation to limit lateral movement if process compromise occurs.
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-66209
GHSA-jw39-3688-r4rx
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB