Relevant Products/Components:
trestle/core/commands/author/jinja.pytrestle author jinjaThe -o/--output argument in trestle author jinja allows writing files outside the intended workspace.
The application does not properly validate:
../..\This allows arbitrary file write to attacker-controlled locations.
Vulnerable code:
output_file = trestle_root / r_output_file
An attacker can overwrite files such as:
.github/workflows/*.yml.git/hooks/*This can lead to CI/CD compromise or local code execution.
git clone https://github.com/oscal-compass/compliance-trestle.git
cd compliance-trestle
echo "hello" > template.j2
trestle author jinja -i template.j2 -o "subdir\..\..\..\..\..\poc.txt"
dir E:\poc.txt
The file is written outside the repository workspace.
Not browser related.
Tested on:
Affected file:
trestle/core/commands/author/jinja.py
Successfully verified:
../..\Local
Yes
Trivial. Single command execution.
No
Runs with privileges of the user executing the trestle command.
An attacker can write files outside the intended workspace directory and overwrite sensitive files writable by the current user.
Possible impacts include:
.github/workflows/*.yml to execute attacker-controlled GitHub Actions workflows.git/hooks/* for local code execution.bashrcIn CI/CD environments, this may result in execution of attacker-controlled commands on build runners.
{
"severity": "HIGH",
"cwe_ids": [
"CWE-22",
"CWE-36",
"CWE-73"
],
"nvd_published_at": null,
"github_reviewed": true,
"github_reviewed_at": "2026-05-28T17:44:03Z"
}