CVE-2026-57171: compliance-trestle author generate path traversal file write

CVE-2026-57171 · Severity: high · CVSS 8.4 · Published 2026-08-26

compliance-trestle is a tool used to manage OSCAL compliance documentation and control catalogs. The author generate commands (catalog-generate, profile-generate, ssp-generate) contain a path traversal vulnerability in their output directory handling that allows an attacker who controls the --output argument to write files outside the intended workspace directory. In CI/automation pipelines where the output path is derived from untrusted data, this could enable arbitrary file creation or (with --force-overwrite) recursive deletion of attacker-chosen directories on the system.

Technologies: compliance-trestle (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-57171 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-57171 being exploited in the wild.
How severe is CVE-2026-57171?
High severity, with a CVSS score of 8.4, published 26 August 2026.
Which products and versions are affected?
compliance-trestle (PyPI) ECOSYSTEM:introduced=0,fixed=3.12.4, ECOSYSTEM:introduced=0,fixed=3.12.4,introduced=4.0.0,fixed=4.1.0.
Is there a fix for CVE-2026-57171?
Yes. compliance-trestle (PyPI): upgrade to 3.12.4, 4.1.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-57171 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-57171?
Check whether you run compliance-trestle (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • compliance-trestle (PyPI): upgrade to 3.12.4, 4.1.0 or later
    pip install "compliance-trestle>=4.1.0"

Technical details

The vulnerability is a path traversal flaw in the author subcommands (catalog-generate, profile-generate, ssp-generate) where the --output argument is joined directly with the trestle_root without proper validation. Unlike the fixed jinja command, these generate commands rely only on is_directory_name_allowed() for checking the output directory name, which validates only the first path component and does not prevent absolute paths or non-leading .. segments. An attacker can supply absolute paths (e.g., /tmp/escape) or relative paths with traversal sequences (e.g., subdir/../../../../../../tmp/escape) to write markdown files outside the workspace. The --force-overwrite flag compounds the risk by recursively deleting the target directory (via shutil.rmtree) before writing, enabling destructive attacks. The fix is to call PathSecurityValidator.validate_local_path() immediately after constructing the markdown_path, mirroring the remediation applied to the jinja command in CVE-2026-46345.

Affected products

  • compliance-trestle compliance-trestle up to and including v4.0.3

Identifiers

  • CVE-2026-57171
  • GHSA-r4vp-3vw6-r2x5
  • PYSEC-2026-4030

Timeline

  • 2026-09-24: disclosed: Advisory GHSA-r4vp-3vw6-r2x5 published
  • 2026-01-01: other: Related CVE-2026-46345 (jinja path traversal) patched in v4.0.3, but fix not applied to generate commands

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.