{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-57170","id":"CVE-2026-57170","title":"Trestle SSTI in Jinja2 include tags allows arbitrary code execution (Incomplete fix of CVE-2026-46439)","description":"Compliance-trestle (Trestle) is a Python SDK and command-line tool for managing OSCAL compliance documents. In 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 the content of an included Markdown file as Jinja2 template code in a non-sandboxed environment, allowing server-side template injection that can lead to arbitr","descriptionLong":"Compliance-trestle (Trestle) is a Python SDK and command-line tool for managing OSCAL compliance documents. In 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 the content of an included Markdown file as Jinja2 template code in a non-sandboxed environment, allowing server-side template injection that can lead to arbitrary code execution. The MDSectionInclude and MDCleanInclude tags in Trestle/core/jinja/tags.py pass included file content to Parser(self.environment, ...).parse(), splicing it into the host template's compilation, and the environment is a plain jinja2.Environment rather than a SandboxedEnvironment, so any expressions in the file are evaluated with full access to the usual SSTI gadget chain. Because Trestle's Markdown writers emit OSCAL prose and component-description fields verbatim, applying delimiter neutralization only to parameter tables, attacker-controlled OSCAL data such as a control statement, part prose, or component description containing Jinja2 syntax flows into an included Markdown file and is executed when the include tag re-parses it. This issue is fixed in version 4.1.0.","published":"2026-08-25T23:18:29.487Z","updated":"2026-10-28T02:30:42.909219732Z","reserved":"2026-06-24T01:47:55.285Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["oscal-compass compliance-trestle"],"affectedProducts":[{"vendor":"oscal-compass","product":"compliance-trestle","defaultStatus":null,"versions":[{"version":"< 3.12.4","status":"affected"},{"version":">= 4.0.0, < 4.1.0","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"compliance-trestle","purl":"pkg:pypi/compliance-trestle","ranges":["<3.12.4",">=4.0.0 <4.1.0"],"fixed":["3.12.4","4.1.0"],"advisory":"GHSA-mr95-65j8-9mxp"}],"cwes":["CWE-94","CWE-1336"],"aliases":["GHSA-mr95-65j8-9mxp","PYSEC-2026-4029"],"references":[{"url":"https://github.com/oscal-compass/compliance-trestle/security/advisories/GHSA-mr95-65j8-9mxp","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/oscal-compass/compliance-trestle/commit/0f82d19bd42f9cc0f1b3acd7fc3f6dafe3b6ae10","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/oscal-compass/compliance-trestle/commit/5335ff873a2a68eb7de43df029bea09cadff22fd","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57170.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57170","tags":["advisory"]},{"url":"https://github.com/oscal-compass/compliance-trestle/pull/2270","tags":["web"]},{"url":"https://github.com/oscal-compass/compliance-trestle","tags":["package"]},{"url":"https://github.com/oscal-compass/compliance-trestle/releases/tag/v3.12.4","tags":["web"]},{"url":"https://github.com/oscal-compass/compliance-trestle/releases/tag/v4.1.0","tags":["web"]},{"url":"https://pypi.org/project/compliance-trestle","tags":["package"]},{"url":"https://github.com/advisories/GHSA-mr95-65j8-9mxp","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00235,"epssPercentile":0.14601,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-57170","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57170","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-57170","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-mr95-65j8-9mxp","ok":true,"note":"GHSA-mr95-65j8-9mxp"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-57170","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}