Improper Neutralization of Special Elements Used in a Template Engine Affecting compliance-trestle package, versions [,3.12.4)[4.0.0,4.1.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.24% (13th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-COMPLIANCETRESTLE-20158968
  • published27 Sept 2026
  • disclosed24 Sept 2026
  • creditUnknown

Introduced: 24 Sep 2026

NewCVE-2026-57170  (opens in a new tab)
CWE-1336  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade compliance-trestle to version 3.12.4, 4.1.0 or higher.

Overview

compliance-trestle is a Tools to manage & autogenerate python objects representing the OSCAL layers/models

Affected versions of this package are vulnerable to Improper Neutralization of Special Elements Used in a Template Engine via the parse method in trestle/core/jinja/tags.py, where untrusted OSCAL data containing Jinja2 template syntax is re-parsed as a live template when markdown content is included via the md Jinja2 tag. An attacker who controls OSCAL prose content (for example, control descriptions or part prose) can inject Jinja2 expressions such as {{ ''.__class__.__mro__[1].__subclasses__() }} that are evaluated in the host Python environment, enabling arbitrary code execution. The fix applies a SandboxedEnvironment for re-parsing included markdown and additionally neutralizes {{/}} delimiters in prose written by _add_one_section and _write_part_info in docs_control_writer.py.

CVSS Base Scores

version 4.0
version 3.1