Skip to main content
EPSS 0.2%top 87%

CVE-2026-57170: CWE-94: Improper Control of Generation of Code ('Code Injection') in oscal-compass compliance-trestle

0
High
VulnerabilityCVE-2026-57170cvecve-2026-57170cwe-94cwe-1336
Published: 08/25/2026 (08/25/2026, 23:18:29 UTC)
Source: CVE Database V5
Vendor/Project: oscal-compass
Product: compliance-trestle

Description

Compliance-trestle versions prior to 3.12.4 and 4.0.0 through 4.0.3 contain a server-side template injection vulnerability due to improper handling of Jinja2 include tags. These tags re-parse included Markdown files as Jinja2 templates in a non-sandboxed environment, allowing arbitrary code execution. The issue is fixed in version 4.1.0.

CVSS v3.1

Score 7.8high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected software

oscal-compass

compliance-trestle

Affected versions
<3.12.4>=4.0.0 <4.1.0

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/09/2026, 20:37:14 UTC

Technical Analysis

Compliance-trestle is a Python SDK and CLI tool for managing OSCAL compliance documents. In affected versions prior to 3.12.4 and 4.0.0 through 4.0.3, the custom Jinja2 include tags mdsection_include and md_clean_include re-parse included Markdown content as Jinja2 template code without sandboxing. This allows server-side template injection (SSTI) because the environment used is a plain jinja2.Environment rather than a SandboxedEnvironment. As a result, attacker-controlled OSCAL data containing Jinja2 syntax can be executed during template rendering, leading to arbitrary code execution. The vulnerability is addressed in version 4.1.0.

Potential Impact

Successful exploitation allows an attacker with at least local privileges to execute arbitrary code on the host system via server-side template injection. This can lead to full compromise of the affected system, including confidentiality, integrity, and availability impacts as indicated by the CVSS vector (C:H/I:H/A:H).

Mitigation Recommendations

Upgrade to compliance-trestle version 4.1.0 or later, where this vulnerability is fixed by using a sandboxed Jinja2 environment for template parsing. Patch status is not explicitly confirmed in the advisory, but the fix is stated to be in version 4.1.0. Until upgrade, avoid processing untrusted OSCAL data that could contain malicious Jinja2 syntax in included Markdown files.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-06-24T01:47:55.285Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6a8e23c2acd9273b49d60c52

Added to database: 08/25/2026, 23:22:42 UTC

Last enriched: 09/09/2026, 20:37:14 UTC

Last updated: 10/09/2026, 06:48:18 UTC

Views: 59

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses