CVE-2026-54757

Trestle has Server-Side Template Injection (SSTI) via Recursive Template Re-evaluation of Untrusted Data

Published Aug 25, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

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

Remediation

No solution or workaround provided in the CVE record.

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
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Oscal-compass
Oscal-compass compliance-trestle
Vendors & Products Oscal-compass
Oscal-compass compliance-trestle
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'}

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 26, 2026, 12:21 PM
Reserved
Jun 15, 2026, 11:12 PM
Status
Deferred
Published
Aug 25, 2026, 11:17 PM
Modified
Sep 9, 2026, 9:09 PM
Severity
Important
Public date
Aug 25, 2026, 11:02 PM