<?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>Compliance-Trestle — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/compliance-trestle/</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>Wed, 27 May 2026 22:58:35 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/compliance-trestle/feed.xml" rel="self" type="application/rss+xml"/><item><title>compliance-trestle Arbitrary File Write via Cache Path Traversal</title><link>https://feed.craftedsignal.io/briefs/2026-05-compliance-trestle-arbitrary-file-write/</link><pubDate>Wed, 27 May 2026 22:58:35 +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 library is vulnerable to an arbitrary file write via cache path traversal due to improper sanitization of URL path components in the remote fetching cache mechanism, potentially leading to remote code execution.</description><content:encoded><![CDATA[<p>The compliance-trestle library, version 4.0.2 and earlier, contains a vulnerability in its remote fetching cache mechanism (HTTPSFetcher and SFTPFetcher) within the <code>trestle/core/remote/cache.py</code> file. This flaw allows for arbitrary file writes due to insufficient sanitization of path traversal sequences (<code>../</code>) in URLs. A malicious OSCAL profile referencing a URL containing path traversal elements can cause the HTTP response body to be written to an arbitrary location on the filesystem, outside of the intended cache directory. This vulnerability was reported on 2026-05-27 and can be exploited to achieve remote code execution.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious OSCAL profile containing an <code>imports</code> section with a URL to a controlled server (e.g., <code>https://evil.com/../../../../../../../tmp/trestle_pwned.json</code>).</li>
<li>The compliance-trestle library parses the malicious OSCAL profile and extracts the URL from the <code>imports</code> section.</li>
<li>The <code>HTTPSFetcher</code> or <code>SFTPFetcher</code> class within <code>cache.py</code> is instantiated to fetch the remote resource.</li>
<li>The library uses <code>urlparse</code> to parse the URL, but it does not sanitize the path component for path traversal sequences.</li>
<li>The library constructs a local cache path using the hostname and the unsanitized path component, resulting in a path outside the intended cache directory.</li>
<li>The library creates the necessary directories using <code>mkdir(parents=True, exist_ok=True)</code>, effectively creating the arbitrary path on the filesystem.</li>
<li>The library fetches the content from the attacker&rsquo;s server using <code>requests.get</code> or an SFTP client.</li>
<li>The fetched content, controlled by the attacker, is written to the arbitrary file path using <code>write_text</code>, leading to arbitrary file write and potentially remote code execution (e.g., by writing to cron job directories or SSH authorized keys).</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to write arbitrary files to the filesystem with the privileges of the user running the compliance-trestle application. This can lead to various impacts, including remote code execution via cron job injection, unauthorized SSH access via authorized keys injection, or configuration file overwrites. The number of victims and targeted sectors are currently unknown, but any system using a vulnerable version of compliance-trestle is susceptible.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to a patched version of compliance-trestle that addresses the path traversal vulnerability.</li>
<li>Apply the provided remediation steps to sanitize path components and implement boundary checks in <code>cache.py</code>.</li>
<li>Monitor network traffic for requests to suspicious domains like <code>evil.com</code> referenced in the IOC table.</li>
<li>Deploy the Sigma rules in this brief to your SIEM and tune for your environment to detect potential exploitation attempts.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>compliance-trestle</category><category>arbitrary-file-write</category><category>path-traversal</category><category>rce</category></item></channel></rss>