CVE-2026-46345 in compliance-trestleinfo

Summary

by MITRE • 08/17/2026

compliance-trestle is a tooling platform for managing compliance as code. Prior to versions 3.12.2 and 4.0.3, the `-o/--output` argument in `trestle author jinja` allows writing files outside the intended workspace. The application does not properly validate, `../`, `..\`, or absolute paths. This allows arbitrary file write to attacker-controlled locations. Versions 3.12.3 and 4.0.3 patch the issue.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 08/17/2026

The compliance-trestle platform serves as a critical infrastructure for managing security posture through code, enabling organizations to automate compliance checks and policy enforcement. Within this ecosystem, the trestle author jinja command provides functionality for rendering Jinja2 templates into final output files. A significant path traversal vulnerability exists in versions prior to 3.12.2 and 4.0.3 regarding how the tool handles the -o or --output argument. This parameter is designed to specify the destination file for rendered content, but it lacks sufficient validation mechanisms to ensure that the provided path remains within the designated workspace boundaries.

The technical flaw stems from an insufficient input sanitization process where the application fails to properly validate paths containing directory traversal sequences such as ../ and ..\, or absolute paths like /etc/passwd on Unix-like systems or C:\Windows\System32 on Windows environments. By accepting these unvalidated inputs, the software allows a user with access to execute this command to write files to arbitrary locations on the file system outside of the intended project directory structure. This behavior violates the principle of least privilege and proper sandboxing expected from configuration management tools, as it grants elevated filesystem write capabilities beyond what is necessary for standard compliance operations.

The operational impact of this vulnerability is severe due to its potential for Arbitrary File Write exploitation. An attacker who can influence or control the input passed to the output argument could overwrite critical system files, inject malicious scripts into executable directories, or compromise configuration files that are read by other privileged processes. This capability effectively allows for remote code execution if combined with other vulnerabilities in the target environment, or it can lead to persistent backdoors and data integrity issues across the organization's infrastructure. The lack of boundary enforcement means that even a low-privileged user could potentially escalate their impact significantly depending on the permissions associated with the compromised file locations.

This vulnerability aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory, which describes flaws where software does not properly neutralize special elements within a pathname that can cause the path to resolve to a location outside of the intended directory. From an offensive security perspective, this technique is consistent with ATT&CK T1564.008: File and Directory Permissions Modification, as it involves manipulating file system structures to achieve persistence or privilege escalation goals. The vulnerability highlights the importance of strict input validation in tools that interact directly with the operating system's filesystem layer.

To mitigate this risk, organizations must upgrade compliance-trestle to version 3.12.3 or later for the legacy branch and version 4.0.3 or later for the current release line. These versions implement proper path normalization and validation checks that ensure all output files are confined within the designated workspace directory. Additionally, administrators should enforce strict input sanitization practices in any custom scripts wrapping these tools and apply principle of least privilege by running compliance tasks under restricted user accounts with limited filesystem write permissions to minimize the blast radius in case of future vulnerabilities.

Responsible

GitHub M

Reservation

05/13/2026

Disclosure

08/17/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!