CVE-2026-46345: compliance-trestle - jinja has an Arbitrary File Write via Path Traversal
Relevant Products/Components: trestle/core/commands/author/jinja.py trestle author jinja --- Detailed Description: The -o/--output argument in trestle author jinja allows writing files outside the intended workspace. The application does not properly validate: ../ ..\ absolute paths This allows arbitrary file write to attacker-controlled locations.
Published May 28, 2026 · Updated Aug 17, 2026
Affected packages
compliance-trestle
- Ecosystem
- PyPI
- Affected
- >= 4.0.0, < 4.0.3
- Fixed in
- 4.0.3
- Check
pip show compliance-trestle
compliance-trestle
- Ecosystem
- PyPI
- Affected
- <= 3.12.1
- Fixed in
- 3.12.2
- Check
pip show compliance-trestle
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Relevant Products/Components:
trestle/core/commands/author/jinja.pytrestle author jinja
---
Detailed Description:
The -o/--output argument in trestle author jinja allows writing files outside the intended workspace.
The application does not properly validate:
../..\- absolute paths
This allows arbitrary file write to attacker-controlled locations.
Vulnerable code:
output_file = trestle_root / r_output_fileAn attacker can overwrite files such as:
.github/workflows/*.yml.git/hooks/*- user writable config files
This can lead to CI/CD compromise or local code execution.
---
Steps To Reproduce:
- Clone the repository:
git clone https://github.com/oscal-compass/compliance-trestle.git
cd compliance-trestle- Create template:
echo "hello" > template.j2- Run:
trestle author jinja -i template.j2 -o "subdir\..\..\..\..\..\poc.txt"- Observe:
dir E:\poc.txtThe file is written outside the repository workspace.
---
Browsers Verified In:
Not browser related.
Tested on:
- Windows 11
- Python 3.13
---
Supporting Material/References:
Affected file:
trestle/core/commands/author/jinja.pySuccessfully verified:
- directory traversal using
../ - Windows traversal using
..\ - arbitrary file write outside workspace
---
Access Vector Required for Exploitation:
Local
---
Vulnerability Exists in Default Configuration?:
Yes
---
Is the exploitation trivial or does it involve a multi-step process that may depend on user/victim interaction?:
Trivial. Single command execution.
---
Exploitation Requires Authentication?:
No
---
Under what privileges does the vulnerable service or component run?:
Runs with privileges of the user executing the trestle command.
Impact
An attacker can write files outside the intended workspace directory and overwrite sensitive files writable by the current user.
Possible impacts include:
- overwriting
.github/workflows/*.ymlto execute attacker-controlled GitHub Actions workflows - overwriting
.git/hooks/*for local code execution - modifying user configuration files such as
.bashrc - tampering with repository files and generated compliance artifacts
In CI/CD environments, this may result in execution of attacker-controlled commands on build runners.
Credited to l3tchupkt.
References
- https://github.com/oscal-compass/compliance-trestle/security/advisories/GHSA-4q5v-7g7x-j79w
- https://github.com/oscal-compass/compliance-trestle/commit/247fcce289f60103f3d8e28d8ec51a6986b94fb6
- https://github.com/oscal-compass/compliance-trestle/commit/7d107b3ac53caca7bde97a6278b23cd739d94525
- https://nvd.nist.gov/vuln/detail/CVE-2026-46345
- https://github.com/pypa/advisory-database/tree/main/vulns/compliance-trestle/PYSEC-2026-2423.yaml
- https://github.com/advisories/GHSA-4q5v-7g7x-j79w
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-57170
Trestle SSTI in Jinja2 include tags allows arbitrary code execution (Incomplete fix of CVE-2026-46439)
high7.8Sep 24, 2026CVE-2026-57171
Trestle is vulnerable to arbitrary file write via path traversal in author generate commands (Incomplete fix of CVE-2026-46345)
high8.4Sep 24, 2026CVE-2026-54757
Trestle has Server-Side Template Injection (SSTI) via Recursive Template Re-evaluation of Untrusted Data
high7.8Aug 28, 2026CVE-2026-52776
compliance-trestle has an URLSecurityValidator SSRF allowlist bypass via IPv4-mapped IPv6 and 0.0.0.0
high8.6Aug 12, 2026CVE-2026-45774
compliance-trestle Profile Import has an Arbitrary File Read via trestle:// URI and Relative Path Traversal
medium5.5May 28, 2026CVE-2026-46380
compliance-trestle Vulnerable to SSRF in Remote Fetching Subsystem
medium6.7May 28, 2026
