{"id":"CVE-2026-54757","published":"2026-08-25T23:02:12Z","modified":"2026-08-26T12:21:23Z","title":"Trestle has Server-Side Template Injection (SSTI) via Recursive Template Re-evaluation of Untrusted Data","vendor":"oscal-compass","product":"compliance-trestle","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00364,"percentile":0.22481,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/oscal-compass/compliance-trestle/security/advisories/GHSA-jw39-3688-r4rx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/oscal-compass/compliance-trestle/commit/0f82d19bd42f9cc0f1b3acd7fc3f6dafe3b6ae10","tags":["x_refsource_MISC"]},{"url":"https://github.com/oscal-compass/compliance-trestle/commit/5335ff873a2a68eb7de43df029bea09cadff22fd","tags":["x_refsource_MISC"]}],"priority":{"score":10.0,"factors":[{"name":"EPSS percentile","points":4.5},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"oscal-compass","affectedVersions":[{"vendor":"oscal-compass","product":"compliance-trestle","versions":["< 3.12.4",">= 4.0.0, < 4.1.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-08-26T12:20:38.208694Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"compliance-trestle","vulnerableRanges":["<3.12.4",">=4.0.0, <4.1.0"],"patched":["3.12.4","4.1.0"],"from":["GHSA-jw39-3688-r4rx","PYSEC-2026-3817"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-66209","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-oscal-compass-compliance-trestle-cve-2026-46439","parents":[{"from":"CVE-2026-46439","to":"CVE-2026-54757","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["trestle/core/commands/author/jinja.py"],"commits":["https://github.com/oscal-compass/compliance-trestle/commit/247fcce289f60103f3d8e28d8ec51a6986b94fb6","https://github.com/oscal-compass/compliance-trestle/commit/7d107b3ac53caca7bde97a6278b23cd739d94525","https://github.com/oscal-compass/compliance-trestle/commit/5335ff873a2a68eb7de43df029bea09cadff22fd"],"basis":"shared function","functions":["jinja_multiple_md"]}]},{"from":"CVE-2026-46345","to":"CVE-2026-54757","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["trestle/core/commands/author/jinja.py"],"commits":["https://github.com/oscal-compass/compliance-trestle/commit/247fcce289f60103f3d8e28d8ec51a6986b94fb6","https://github.com/oscal-compass/compliance-trestle/commit/7d107b3ac53caca7bde97a6278b23cd739d94525","https://github.com/oscal-compass/compliance-trestle/commit/5335ff873a2a68eb7de43df029bea09cadff22fd"],"basis":"shared function","functions":["jinja_multiple_md"]}]}]}}