Description
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.
Published: 2026-08-25
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Patch Immediately
AI Analysis

Impact

A server‑side template injection flaw allows an attacker to inject malicious Jinja2 expressions that are re‑evaluated by Trestle’s non‑sandboxed Jinja2 environment. The vulnerability exists in MDCleanInclude and MDSectionInclude tags when processing untrusted Markdown or YAML content. The injected code can traverse Python object internals and execute arbitrary operating system commands within the Trestle process, leading to full remote code execution on the host system.

Affected Systems

The vulnerability affects Compliance‑Trestle (Trestle), a Python SDK and CLI for OSCAL compliance, provided by OSCAL Compass. Versions before 3.12.4 and versions 4.0.0 through 4.0.3 are impacted; the issue is resolved in 3.12.4 and 4.1.0.

Risk and Exploitability

The published CVSS score is 7.8, indicating a high-severity flaw. The EPSS score of <1% shows a low probability of exploitation, and the vulnerability is not listed in the CISA KEV catalog, suggesting no widespread documented exploitation yet. Attackers with control over content that Trestle renders — such as crafted workspace Markdown, third‑party SSP documents, or YAML lookup tables — can exploit the flaw by injecting Jinja2 expressions that access internal object attributes and invoke system commands. The vulnerability can be triggered remotely by supplying malicious content that Trestle processes.

Generated by OpenCVE AI on August 28, 2026 at 18:31 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update Compliance‑Trestle to version 3.12.4 or later, or to 4.1.0 or later, where the server‑side template injection has been fixed.
  • If an upgrade is not immediately possible, limit Trestle’s ability to process untrusted Markdown or YAML by restricting file sources or removing third‑party content from the rendering pipeline.
  • Monitor Trestle logs for unexpected Jinja2 template rendering or system command execution and enforce strict file‑access controls to reduce the opportunity for an attacker to supply malicious content.

Generated by OpenCVE AI on August 28, 2026 at 18:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-jw39-3688-r4rx Trestle has Server-Side Template Injection (SSTI) via Recursive Template Re-evaluation of Untrusted Data
History

Thu, 27 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-917
References
Metrics threat_severity

None

threat_severity

Important


Wed, 26 Aug 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 26 Aug 2026 01:30:00 +0000

Type Values Removed Values Added
First Time appeared Oscal-compass
Oscal-compass compliance-trestle
Vendors & Products Oscal-compass
Oscal-compass compliance-trestle

Tue, 25 Aug 2026 23:15:00 +0000

Type Values Removed Values Added
Description 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.
Title Trestle has Server-Side Template Injection (SSTI) via Recursive Template Re-evaluation of Untrusted Data
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Oscal-compass Compliance-trestle
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-26T12:21:23.031Z

Reserved: 2026-06-15T23:12:41.965Z

Link: CVE-2026-54757

cve-icon Vulnrichment

Updated: 2026-08-26T12:20:50.152Z

cve-icon NVD

Status : Deferred

Published: 2026-08-25T23:17:19.277

Modified: 2026-09-09T21:09:13.080

Link: CVE-2026-54757

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-25T23:02:12Z

Links: CVE-2026-54757 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-28T18:45:03Z

Weaknesses
  • CWE-917

    Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')