cve.bz

CVE-2026-57171 oscal-compass compliance-trestle: Path traversal

7.7 highEPSS 0.2%Fix available

High (7.7) in oscal-compass compliance-trestle. EPSS 0.2% 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, the catalog-generate, profile-generate, and ssp-generate author commands write generated Markdown to an attacker-influenced output path without path-traversal validation, allowing arbitrary file write outside the Trestle workspace. These commands join the user-supplied output argument onto the Trestle root and write to the result, but guard it only with an is_directory_name_allowed() task-name-collision check rather than the PathSecurityValidator.validate_local_path() guard used by the jinja command, so an absolute path or one containing traversal sequences escapes the workspace and writes files under an attacker-chosen location as the invoking process owner. The security boundary is crossed when a trusted CI job, shared service, or wrapper derives the output argument from repository-controlled, tenant-controlled, or otherwise untrusted data while expecting output to stay inside the workspace. When --force-overwrite is used, the selected output directory is first recursively deleted, extending the primitive to destruction of an attacker-chosen directory tree and enabling indirect code execution by overwriting files a pipeline later runs. This issue is fixed in versions 3.12.4 and 4.1.0.

Severity

CVSS 3.1

7.7 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 13th 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: partial, assessed 2026-08-27. 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-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
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-57171 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-57171?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-57171?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-57171 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-r4vp-3vw6-r2x5PyPIcompliance-trestle<3.12.43.12.4
GHSA-r4vp-3vw6-r2x5PyPIcompliance-trestle>=4.0.0 <4.1.04.1.0
PYSEC-2026-4030PyPIcompliance-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 was found in Compliance-trestle (Trestle), an upstream Python SDK and command-line tool for managing OSCAL compliance documents. The catalog-generate, profile-generate, and ssp-generate author commands join the user-supplied -o/--output argument onto the Trestle workspace root without path-traversal validation, so an output value containing an absolute path or traversal sequences escapes the workspace and writes generated Markdown files to an attacker-chosen location as the invoking process owner. The security boundary is crossed when a trusted CI job, automation pipeline, shared service, or wrapper derives the output argument from repository-controlled, tenant-controlled, or otherwise untrusted data while expecting the output to remain inside the workspace; the attacker needs no local shell access, only influence over the data mapped into the output argument. When --force-overwrite is used, the selected output directory is recursively deleted before generation, extending the impact to destruction of an attacker-chosen directory tree and to possible indirect code execution by overwriting files a pipeline later runs. Red Hat rated this flaw IMPORTANT with a CVSS 3.1 base score of 7.7 (AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H), a conservative variant of the upstream advisory's 8.4 score that reflects the demonstrated write/overwrite primitive rather than information disclosure. The Red Hat products evaluated for this flaw (the openshift-compliance-content-rhel8 container image and the scap-security-guide package) were assessed by the responsible product teams as not affected because the vulnerable compliance-trestle component is not present in the shipped artifacts, so no Red Hat fix is required.

Red Hat's mitigation

Red Hat products referencing this component were assessed as not affected because the vulnerable compliance-trestle component is not present in the shipped artifacts, so no Red Hat mitigation is required. Direct users of the upstream compliance-trestle package can mitigate the issue by ensuring the -o/--output argument passed to the trestle author catalog-generate, profile-generate, and ssp-generate commands is never derived from untrusted (for example repository- or tenant-controlled) data and always resolves to a fixed, validated directory inside the Trestle workspace, and by avoiding the --force-overwrite option when the output path is not fully trusted. Upgrading to a fixed upstream release (3.12.4 or 4.1.0) resolves the issue.

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-57171.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

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

References

Check your stackJSON