cve.bz

CVE-2026-54757 oscal-compass compliance-trestle: Code Injection

7.8 highEPSS 0.4%Fix available

High (7.8) in oscal-compass compliance-trestle. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in compliance-trestle 3.12.4, 4.1.0.

On this page
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.

Severity

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
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 31st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-08-26. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • compliance-trestle (PyPI): fixed in 3.12.4, 4.1.0

Ask an AI about this CVE

Show the promptExplain CVE-2026-54757 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-54757?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-54757?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-54757 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
oscal-compass compliance-trestle< 3.12.4
oscal-compass compliance-trestle>= 4.0.0, < 4.1.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-jw39-3688-r4rxPyPIcompliance-trestle<3.12.43.12.4
GHSA-jw39-3688-r4rxPyPIcompliance-trestle>=4.0.0 <4.1.04.1.0
PYSEC-2026-3817PyPIcompliance-trestle<3.12.4
>=4.0.0 <4.1.0
3.12.4, 4.1.0

Red Hat

Red Hat rates this Important.

Red Hat's statement

An IMPORTANT severity flaw (CVSS 3.1 score 7.8, AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) was found in Compliance-trestle (Trestle), an upstream Python SDK and command-line tool for managing OSCAL compliance documents. The MDCleanInclude and MDSectionInclude custom Jinja2 tags in Trestle re-parse untrusted Markdown content as Jinja2 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. Exploitation requires a user to process attacker-controlled content with Trestle (local attack vector with user interaction required). The Red Hat products listed on this flaw are not affected: the File Integrity Operator compliance content image and scap-security-guide in Red Hat Hardened Images consume compliance-trestle only as a build-time dependency, and the vulnerable component is not present in the shipped artifacts, so the corresponding product trackers were closed as Not a Bug with a Component not Present justification. The Red Hat severity rating of IMPORTANT is consistent with the upstream rating.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
File Integrity Operatorcompliance/openshift-compliance-content-rhel8Not affected
Red Hat Hardened Imagesscap-security-guideNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-54757.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON