# CVE-2026-54757: Trestle has Server-Side Template Injection (SSTI) via Recursive Template Re-evaluation of Untrusted Data

- Severity: High 7.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 17% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-25T23:02:12.422Z
- Modified: 2026-09-10T12:25:55.209Z
- Also known as: GHSA-jw39-3688-r4rx, PYSEC-2026-3817
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- oscal-compass compliance-trestle: < 3.12.4; >= 4.0.0, < 4.1.0
- compliance-trestle (PyPI): before 3.12.4; from 4.0.0 before 4.1.0

## Every score

- GitHub_M: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/oscal-compass/compliance-trestle/security/advisories/GHSA-jw39-3688-r4rx> (exploit, web)
- <https://github.com/oscal-compass/compliance-trestle/commit/0f82d19bd42f9cc0f1b3acd7fc3f6dafe3b6ae10> (web)
- <https://github.com/oscal-compass/compliance-trestle/commit/5335ff873a2a68eb7de43df029bea09cadff22fd> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-54757> (advisory)
- <https://github.com/oscal-compass/compliance-trestle/pull/2257> (web)
- <https://github.com/oscal-compass/compliance-trestle> (package)
- <https://github.com/oscal-compass/compliance-trestle/releases/tag/v3.12.4> (web)
- <https://github.com/oscal-compass/compliance-trestle/releases/tag/v4.1.0> (web)
- <https://pypi.org/project/compliance-trestle> (package)
- <https://github.com/advisories/GHSA-jw39-3688-r4rx> (advisory)

## Sources

- CVE List: [CVE-2026-54757](https://www.cve.org/CVERecord?id=CVE-2026-54757), CVE Terms of Use, modified 2026-08-26
- GitHub Advisory Database: [GHSA-jw39-3688-r4rx](https://github.com/advisories/GHSA-jw39-3688-r4rx), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-54757](https://nvd.nist.gov/vuln/detail/CVE-2026-54757), Public domain, modified 2026-09-09
- PyPA Advisory Database: [PYSEC-2026-3817](https://osv.dev/vulnerability/PYSEC-2026-3817), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2026-54757 · Whole record: https://cve.day/CVE-2026-54757.json · Rebuilt by cve.day 2026-11-25T22:59:35.321Z
