Skip to main content

compliance-trestle CVE-2026-46345

| EUVDEUVD-2026-60317 HIGH
Path Traversal (CWE-22)
2026-05-28 https://github.com/oscal-compass/compliance-trestle GHSA-4q5v-7g7x-j79w PYSEC-2026-2423
8.4
CVSS 3.1 · Vendor: https://github.com/oscal-compass/compliance-trestle
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Gain influence over trestle CLI invocation
  2. Delivery
    Supply crafted -o path with ../ or absolute path
  3. Exploit
    Trestle joins path without normalization
  4. Install
    Arbitrary file written as invoking user
  5. C2
    Overwrite .github/workflows or .git/hooks
  6. Execute
    CI/CD or git operation executes attacker code
  7. Impact
    Pivot to secrets exfiltration or repo compromise

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must be able to control the value of the -o/--output argument to trestle author jinja (for example by submitting a PR that triggers a CI job invoking trestle with attacker-influenced output paths, by tampering with a Makefile or job script, or by tricking a developer into copy-pasting a command), and the trestle process must run as a user with write permission to the target file. The vulnerability exists in the default configuration per the reporter and requires no authentication to trestle itself; exploitation is limited to local context (AV:L) - there is no network-reachable trestle service - so it is not exploitable purely over the network without first reaching local command invocation, and impact is bounded by the filesystem permissions of the user running the command. The reporter verified on Windows 11 / Python 3.13 but POSIX traversal (../) is also confirmed, so platform is not a meaningful limit.

Impact

The CVSS 3.1 vector AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H scores 8.4 - high impact but requires local invocation of the trestle author jinja command, which limits the realistic attacker population to anyone who can influence the -o argument (e.g., a malicious template repo, a CI job consuming untrusted input, or a multi-user developer workstation). EPSS and CISA KEV status are not provided in the input. No public exploit identified at time of analysis, though the advisory itself ships a working PoC, so weaponization cost is effectively zero. The highest real-world risk is in CI/CD pipelines that run trestle author jinja over attacker-influenced repository content: overwriting .github/workflows/*.yml or .git/hooks/* converts arbitrary file write into code execution on build runners. For isolated, single-user authoring workstations the practical risk is lower. PR:N in the vector is consistent with the description ('Exploitation Requires Authentication? No') but should be read as 'no authentication to the trestle CLI'; the attacker still needs local execution of the command.

Exploit ScenarioDerived

In a CI pipeline that runs trestle author jinja against a contributor's pull request, the attacker submits a PR whose trestle config or invocation passes -o "subdir/../../../.github/workflows/release.yml", overwriting the repository's workflow file with attacker-controlled YAML that executes on the next push or schedule and exfiltrates CI secrets. A PoC is published in the GitHub Security Advisory demonstrating the single-command form trestle author jinja -i template.j2 -o "subdir\..\..\..\..\..\poc.txt".

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 28, 2026

Arbitrary file write in compliance-trestle's trestle author jinja command allows a local user supplying a crafted -o/--output argument to write files anywhere the invoking user can write, due to missing validation of ../, ..\, and absolute paths. Affected versions are <= 3.12.1 and >= 4.0.0, < 4.0.3, with fixes in 3.12.2 and 4.0.3. No public exploit identified at time of analysis, though the GitHub Security Advisory (GHSA-4q5v-7g7x-j79w) includes a full reproducer; CVSS 8.4 reflects high impact on confidentiality, integrity, and availability.

RemediationAI

Upgrade to the vendor-released patched versions: compliance-trestle 3.12.2 on the 3.x branch or 4.0.3 on the 4.x branch (pip install --upgrade compliance-trestle4.0.3 or 3.12.2); fix commits are 247fcce289f60103f3d8e28d8ec51a6986b94fb6 and 7d107b3ac53caca7bde97a6278b23cd739d94525, and the advisory is at https://github.com/oscal-compass/compliance-trestle/security/advisories/GHSA-4q5v-7g7x-j79w. Until upgrade is possible, do not pass untrusted values to -o/--output, treat templates and template metadata from untrusted repositories as hostile, and in CI run trestle author jinja only inside an ephemeral container or sandbox whose filesystem does not contain .github/workflows, .git/hooks, or user dotfiles writable by the build user (trade-off: requires pipeline restructuring and may break workflows that intentionally write generated docs back into the workspace). On shared developer hosts, restrict who can invoke trestle and avoid running it from a path with write access to sensitive parent directories.

Affected VersionsENISA

compliance-trestle < 3.12.2
compliance-trestle 4.0.0, < 4.0.3

Affected Packages

pypi compliance-trestle fix: 3.12.2, 4.0.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

compliance-trestle is the OSCAL-compass Python tool (distributed via PyPI as compliance-trestle) used to author and validate NIST OSCAL compliance artifacts. The trestle author jinja subcommand renders Jinja2 templates and writes the result to a path supplied by the user. The vulnerable construct in trestle/core/commands/author/jinja.py is output_file = trestle_root / r_output_file - under Python's pathlib, /-joining with an absolute path discards the left operand, and joining with .. segments simply walks the resulting path upward, so neither relative traversal sequences nor absolute paths are normalized or constrained to the trestle workspace root. This is a textbook CWE-22 Path Traversal in a CLI sink. The same patch series (commits 247fcce and 7d107b3) additionally hardens the Jinja render pipeline by removing recursive template re-evaluation of rendered output, mitigating an SSTI-style attack path through untrusted template variables.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/oscal-compass/compliance-trestle) PRIMARY 8.4 HIGH
AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat 8.4 HIGH

Primary rating from Vendor (https://github.com/oscal-compass/compliance-trestle).

CVSS VectorVendor: https://github.com/oscal-compass/compliance-trestle

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

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.

Vulnerable code:

python
output_file = trestle_root / r_output_file

An 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:

  1. Clone the repository:
bash
git clone https://github.com/oscal-compass/compliance-trestle.git
cd compliance-trestle
  1. Create template:
bash
echo "hello" > template.j2
  1. Run:
powershell
trestle author jinja -i template.j2 -o "subdir\..\..\..\..\..\poc.txt"
  1. Observe:
powershell
dir E:\poc.txt

The 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:

text
trestle/core/commands/author/jinja.py

Successfully 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/*.yml to 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.

Executive ViewAI

Why It Matters

Organizations managing NIST compliance documentation through compliance-trestle face a regulatory risk from a path traversal vulnerability in the jinja templating component that allows local attackers to read or modify compliance artifacts outside their intended scope. The vulnerability (CVE-2026-46345, CVSS 8.4) affects versions 3.12.1 and earlier, and 4.0.0-4.0.2; no public exploit identified at time of analysis, though a full reproducer is available in the GitHub Security Advisory. Immediate patching to versions 3.12.2 or 4.0.3 is critical to preserve compliance documentation integrity and prevent potential regulatory violations.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 84% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

62
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy