/

CVE-2026-57171

Severity:

HIGH RISK

(7.7)

Path Traversal (CWE-22) in Trestle Author Commands

CVE-2026-57171

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write and Directory Destruction

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Compliance-trestle's catalog, profile, and SSP generation commands may write Markdown outside the intended Trestle workspace when their output path is influenced by untrusted data. An attacker who can control that path may cause files or directories to be overwritten as the invoking process owner, and forced overwrite mode may also delete an attacker-selected directory tree.

Affected context

The issue occurs in Trestle author commands that generate Markdown and append a user-supplied output argument to the Trestle root without applying the local-path security validation used by other commands. Risk depends on a trusted CI job, shared service, wrapper, or automation pipeline deriving the output path from repository-controlled, tenant-controlled, or otherwise untrusted input while assuming that generated files remain within the workspace.

Exploit preconditions

  • Attack surface: The catalog-generate, profile-generate, or

ssp-generate author command.

  • Required access: The ability to influence the command's output argument

or the data from which that argument is derived.

  • Trigger point: Path resolution and file generation during command

execution, especially when forced overwrite is enabled.

  • Why exploitation is possible: The output path is checked for task-name

collisions but is not consistently validated as a confined local path, so

absolute paths or traversal components can escape the workspace. The

invoking process permissions determine what can be written or removed.

Why this happens

The underlying bug is insufficient canonical path validation at a filesystem trust boundary. The commands combine a trusted workspace root with attacker-influenced path data but rely on a name-collision check rather than verifying that the resolved destination remains beneath the permitted root. This maps to CWE-22: Path Traversal, where path elements allow access outside the intended directory. Recursive deletion in forced overwrite mode increases the impact of the same missing containment check.

Potential impact

  • An attacker may write generated or replacement content to arbitrary paths permitted to the invoking process.
  • Existing files may be overwritten, which could alter configuration, scripts, or pipeline inputs.
  • Forced overwrite may delete an attacker-selected directory tree.
  • A downstream automation process could execute tampered files, enabling indirect code execution.
  • Shared services or CI workers could experience cross-tenant or cross-workspace impact.

General mitigation guidance

Mitigation generally focuses on enforcing filesystem confinement consistently across every command that accepts an output path. Secure-by-default designs resolve and canonicalize destinations, reject absolute paths and traversal escapes, and verify that the final path remains beneath an approved workspace root before writing or deleting. Input trust should be reduced by treating repository, tenant, and wrapper-provided paths as untrusted, while deletion operations should require separate, narrowly scoped safeguards. Running automation with least-privilege filesystem permissions, isolated workspaces, and minimal write access can limit consequences if validation fails.

How teams detect issues like this

Detection can include static analysis and code review rules that identify filesystem writes or recursive deletes using user-controlled paths, path joining without canonical containment checks, and validation based only on filename or task-name collisions. CI policies can require approved path validation helpers for commands that accept output locations and can flag absolute paths or traversal components in generated job specifications. Runtime monitoring may alert on writes or deletions outside the expected workspace, particularly from shared automation identities. Automated review tools can help identify inconsistent use of path-security utilities.

Sources

SourceLink
github.comgithub.com/oscal-compass/compliance-trestle/commit/37ed44f5f2e074202c8eb7c2f203c05d19461cdc
github.comgithub.com/oscal-compass/compliance-trestle/releases/tag/v4.1.0
github.comgithub.com/oscal-compass/compliance-trestle/security/advisories/GHSA-4q5v-7g7x-j79w
github.comgithub.com/oscal-compass/compliance-trestle/security/advisories/GHSA-r4vp-3vw6-r2x5

Frequently asked

questions

It is not inherently a network-level issue. Exploitation becomes possible when

a trusted Trestle execution environment accepts output-path data controlled by

a repository, tenant, shared service user, or another untrusted source.

An attacker needs a way to influence the output argument or the input used to

derive it, plus an execution context that has permission to write or delete

the targeted filesystem location.

Resolve and validate every destination against an explicitly approved

workspace before any write or deletion, rejecting paths that are absolute or

escape that workspace after canonicalization.

Treat all path inputs as untrusted, centralize path-security validation,

review destructive overwrite behavior separately, enforce least privilege,

and monitor automation for filesystem activity outside designated workspaces.

Find out what's already
exploitable in your codebase.