CVE-2026-54757: CWE-94: Improper Control of Generation of Code ('Code Injection') in oscal-compass compliance-trestle
Description
Compliance-trestle is vulnerable to server-side template injection in versions before 3.12.4 and 4.0.0 through 4.0.3. This vulnerability allows remote code execution via crafted Markdown or YAML content due to unsafe Jinja2 template parsing. The issue is fixed in versions 3.12.4 and 4.1.0.
CVSS v3.1
Score 7.8high
Affected software
oscal-compass
compliance-trestle
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Compliance-trestle, a Python SDK and CLI tool for OSCAL compliance documents, suffers from a server-side template injection vulnerability (CWE-94) in its MDCleanInclude and MDSectionInclude Jinja2 tags. These tags re-parse untrusted Markdown content as Jinja2 templates using a non-sandboxed environment, enabling an attacker controlling rendered content to inject Jinja2 expressions that execute arbitrary OS commands within the Trestle process context. Versions before 3.12.4 and 4.0.0 through 4.0.3 are affected. The vulnerability is resolved in versions 3.12.4 and 4.1.0.
Potential Impact
An attacker who can supply crafted Markdown or YAML content that Trestle renders can achieve remote code execution on the system running Trestle. This leads to full compromise of the Trestle process and potentially the host system. The CVSS score of 7.8 reflects high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade to Compliance-trestle version 3.12.4 or later, or 4.1.0 or later, where this vulnerability is fixed. No other mitigations are specified. Patch status is not explicitly stated in the vendor advisory, but the fixed versions are clearly identified.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-15T23:12:41.965Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a8e23c2acd9273b49d60c5a
Added to database: 08/25/2026, 23:22:42 UTC
Last enriched: 09/09/2026, 20:22:46 UTC
Last updated: 10/09/2026, 18:48:21 UTC
Views: 73
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.