Skip to main content

compliance-trestle CVE-2026-54757

| EUVDEUVD-2026-66209 HIGH
Code Injection (CWE-94)
2026-08-25 security-advisories@github.com GHSA-jw39-3688-r4rx
7.8
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Plant malicious Jinja2 payload in Markdown/YAML
  2. Delivery
    User imports artifact into Trestle workspace
  3. Exploit
    User invokes trestle render/author command
  4. Execution
    MDCleanInclude re-parses content via non-sandboxed Environment
  5. Persist
    Traverse Python object internals
  6. Impact
    Execute 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
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 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

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 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

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

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.

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

Lifecycle Timeline

2
Patch available
Aug 28, 2026 - 18:02 EUVD
CVE Published
Aug 25, 2026 - 23:17 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 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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Low
niche OSCAL/FedRAMP compliance automation tool, government-adjacent
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

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
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

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