<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>CI/CD Compromise — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/ci/cd-compromise/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 28 May 2026 17:56:59 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/ci/cd-compromise/feed.xml" rel="self" type="application/rss+xml"/><item><title>compliance-trestle Arbitrary File Write via Path Traversal</title><link>https://feed.craftedsignal.io/briefs/2026-05-compliance-trestle-arbitrary-file-write/</link><pubDate>Thu, 28 May 2026 17:56:59 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-compliance-trestle-arbitrary-file-write/</guid><description>The compliance-trestle application is vulnerable to arbitrary file write via path traversal; the `-o/--output` argument in `trestle author jinja` allows writing files outside the intended workspace due to improper validation of path traversal characters, leading to potential CI/CD compromise or local code execution by overwriting sensitive files such as `.github/workflows/*.yml` or `.git/hooks/*`.</description><content:encoded><![CDATA[<p>The compliance-trestle application, specifically the <code>trestle author jinja</code> command, is susceptible to an arbitrary file write vulnerability due to insufficient validation of the output path. By manipulating the <code>-o/--output</code> argument, an attacker can write files to locations outside the intended workspace directory. This is because the application fails to properly sanitize path traversal characters such as <code>../</code> and <code>..\</code>, as well as absolute paths. This vulnerability was reported on May 28, 2026. Successful exploitation can lead to overwriting critical files, potentially compromising CI/CD pipelines or enabling local code execution. This poses a significant risk to systems using compliance-trestle, particularly in automated environments where file integrity is crucial. The vulnerability affects compliance-trestle versions prior to 4.0.3 and versions up to 3.12.1.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains local access to a system with compliance-trestle installed.</li>
<li>The attacker crafts a malicious template file (e.g., <code>template.j2</code>) containing arbitrary content.</li>
<li>The attacker executes the <code>trestle author jinja</code> command, specifying the malicious template file using the <code>-i</code> parameter.</li>
<li>The attacker uses the <code>-o</code> parameter to specify an output path containing path traversal sequences (e.g., <code>subdir\..\..\..\..\..\poc.txt</code>) or an absolute path.</li>
<li>Due to insufficient validation, the application writes the content of the template file to the attacker-specified location outside the intended workspace.</li>
<li>The attacker overwrites a sensitive file, such as <code>.github/workflows/*.yml</code> or <code>.git/hooks/*</code>.</li>
<li>If a <code>.github/workflows/*.yml</code> file is overwritten, the next CI/CD run executes attacker-controlled code.</li>
<li>If a <code>.git/hooks/*</code> file is overwritten, a subsequent <code>git</code> command executes attacker-controlled code.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to write arbitrary files outside the intended workspace directory, potentially overwriting sensitive files writable by the user running the <code>trestle</code> command. This can lead to various impacts, including CI/CD compromise by overwriting <code>.github/workflows/*.yml</code> files, resulting in the execution of attacker-controlled GitHub Actions workflows. Overwriting <code>.git/hooks/*</code> files can lead to local code execution when git commands are run. Additionally, user configuration files such as <code>.bashrc</code> can be modified, and repository files and generated compliance artifacts can be tampered with. In CI/CD environments, this can result in the execution of attacker-controlled commands on build runners, leading to potential data breaches or system compromise.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the patch or upgrade to compliance-trestle version 4.0.3 or later to address CVE-2026-46345.</li>
<li>Deploy the Sigma rules provided in this brief to detect exploitation attempts.</li>
<li>Implement strict input validation on the <code>-o/--output</code> argument within <code>trestle author jinja</code> to prevent path traversal (reference vulnerability description).</li>
<li>Monitor file system events for suspicious file writes outside the intended workspace directory using process creation logs.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>arbitrary file write</category><category>path traversal</category><category>compliance-trestle</category><category>github actions</category><category>CI/CD compromise</category></item></channel></rss>