CVE-2026-54757 Trestle has Server-Side Template Injection (SSTI) via Recursive Template Re-evaluation of Untrusted Data
Attackers can execute arbitrary OS commands by injecting Jinja2 expressions into Markdown or YAML inputs processed by the Trestle compliance tool.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-54757?
CVE-2026-54757 is a high-severity code injection vulnerability in oscal-compass compliance-trestle, published on 25 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-94
Which versions are affected by CVE-2026-54757?
5 open source packages ship an affected version, including compliance-trestle.
| Package | Affected | Fixed in |
|---|---|---|
compliance-trestle PyPI | All versions | 3.12.4, 4.1.0 |
compliance-trestle PyPI | All versions | 3.12.4 |
compliance-trestle PyPI | All versions | 3.12.4 |
compliance-trestle PyPI | From 4.0.0 | 4.1.0 |
compliance-trestle PyPI | From 4.0.0 | 4.1.0 |
How do I fix CVE-2026-54757?
Upgrade compliance-trestle to a fixed version for your release line: 3.12.4 or 4.1.0.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-54757 being exploited?
There is no known exploitation of CVE-2026-54757 in the wild and no public exploit code.
Sources
Also known as GHSA-jw39-3688-r4rx, PYSEC-2026-3817.