Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. compliance-trestle
  4. ›
  5. CVE-2026-57171

CVE-2026-57171: Trestle is vulnerable to arbitrary file write via path traversal in author generate commands (Incomplete fix of CVE-2026-46345)

September 24, 2026

At a glance

  • Actor: attacker who controls the -o/–output argument to trestle author {catalog,profile,ssp}-generate (e.g. via a CI pipeline that derives the output directory from repository-controlled data)

  • Primitive: attacker-controlled –output value reaches trestle_root / args.output write sink with only is_directory_name_allowed() (parts[0]-only task-name-collision check), not the PathSecurityValidator.validate_local_path() guard added by the CVE-2026-46345 fix

  • Impact: arbitrary-location file write outside the trestle workspace as the process owner (8.4 High; conservative C:N variant 7.7, still High); with –force-overwrite, the attacker-chosen directory is first recursively deleted shutil.rmtree)

  • Precondition: attacker influences the -o argument in a CI/automation pipeline or multi-tenant trestle workspace running these generate subcommands

  • Fix: call PathSecurityValidator.validate_local_path(markdown_path, trestle_root) immediately after building markdown_path in catalog.py, ssp.py, and prof.py, mirroring the existing jinja fix

References

  • github.com/advisories/GHSA-r4vp-3vw6-r2x5
  • github.com/oscal-compass/compliance-trestle/commit/37ed44f5f2e074202c8eb7c2f203c05d19461cdc
  • github.com/oscal-compass/compliance-trestle/commit/5335ff873a2a68eb7de43df029bea09cadff22fd
  • github.com/oscal-compass/compliance-trestle/pull/2270
  • github.com/oscal-compass/compliance-trestle/releases/tag/v3.12.4
  • github.com/oscal-compass/compliance-trestle/releases/tag/v4.1.0
  • github.com/oscal-compass/compliance-trestle/security/advisories/GHSA-4q5v-7g7x-j79w
  • github.com/oscal-compass/compliance-trestle/security/advisories/GHSA-r4vp-3vw6-r2x5
  • nvd.nist.gov/vuln/detail/CVE-2026-57171

Code Behaviors & Features

Detect and mitigate CVE-2026-57171 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.12.4, all versions starting from 4.0.0 before 4.1.0

Fixed versions

  • 3.12.4
  • 4.1.0

Solution

Upgrade to versions 3.12.4, 4.1.0 or above.

Impact 8.4 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

pypi/compliance-trestle/CVE-2026-57171.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 25 Sep 2026 12:17:57 +0000.