<?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>Symlink — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/symlink/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 29 Apr 2026 07:50:36 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/symlink/feed.xml" rel="self" type="application/rss+xml"/><item><title>CVE-2025-68146 filelock TOCTOU Race Condition Enables Symlink Attacks</title><link>https://feed.craftedsignal.io/briefs/2024-05-filelock-symlink/</link><pubDate>Wed, 29 Apr 2026 07:50:36 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-05-filelock-symlink/</guid><description>CVE-2025-68146 describes a Time-of-Check Time-of-Use (TOCTOU) race condition vulnerability in the filelock library that could allow for symlink attacks during lock file creation, potentially leading to unauthorized file access or modification.</description><content:encoded><![CDATA[<p>CVE-2025-68146 is a security vulnerability residing within the filelock library, a widely used Python library for file locking. The vulnerability stems from a Time-of-Check Time-of-Use (TOCTOU) race condition that occurs during the creation of lock files. This weakness can be exploited by a local attacker to perform symlink attacks. By carefully manipulating the file system, an attacker can potentially redirect the lock creation process to a file location they control. This is a locally exploitable vulnerability with potential for privilege escalation and unauthorized access, but requires local access to the vulnerable system. The advisory was published on April 29, 2026.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains initial local access to the system.</li>
<li>Attacker identifies an application utilizing the vulnerable filelock library for file locking operations.</li>
<li>Attacker creates a symbolic link (symlink) pointing the expected lock file path to a file location under their control.</li>
<li>The vulnerable application attempts to create a lock file at the expected location.</li>
<li>Due to the TOCTOU race condition, between the time the application checks for the existence of the lock file and the time it attempts to create it, the symlink is followed.</li>
<li>The lock file is created in the attacker-controlled location instead of the intended secure location.</li>
<li>The application continues execution, believing it has exclusive access, while the attacker can potentially modify or access the protected resource.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2025-68146 allows an attacker to manipulate file locking mechanisms, potentially leading to unauthorized modification or access to sensitive files. This can lead to data corruption, privilege escalation, or denial of service. The vulnerability requires local access, limiting the scope of potential attacks, but can be a critical issue in multi-user environments or systems with sensitive data.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply patches or updates provided by the vendor (Microsoft) to address CVE-2025-68146 when they become available.</li>
<li>Implement file integrity monitoring to detect unauthorized modifications to critical files and directories.</li>
<li>Deploy the Sigma rule provided below to detect suspicious symlink creation attempts that might indicate exploitation of this TOCTOU vulnerability.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>TOCTOU</category><category>symlink</category><category>filelock</category><category>CVE-2025-68146</category><category>race condition</category></item><item><title>OpenClaw Symlink Vulnerability in SSH Sandbox Tar Upload (CVE-2026-41364)</title><link>https://feed.craftedsignal.io/briefs/2026-04-openclaw-symlink/</link><pubDate>Tue, 28 Apr 2026 00:16:25 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-openclaw-symlink/</guid><description>OpenClaw before 2026.3.31 contains a symlink following vulnerability in SSH sandbox tar upload that allows remote attackers to write arbitrary files by uploading a malicious tar archive containing symlinks, leading to arbitrary file write on the remote host.</description><content:encoded><![CDATA[<p>OpenClaw versions before 2026.3.31 are vulnerable to a symlink following issue within the SSH sandbox tar upload functionality. This vulnerability, identified as CVE-2026-41364, allows a remote attacker with the ability to upload tar archives to the OpenClaw instance to potentially escape the intended sandbox environment. By crafting a malicious tar archive containing carefully constructed symbolic links, an attacker can overwrite arbitrary files on the remote host, leading to a compromise of the system&rsquo;s integrity. This vulnerability was reported and patched in version 2026.3.31. Defenders need to ensure they are running patched versions to mitigate the risk of exploitation.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker authenticates to the OpenClaw instance via SSH, gaining access to the restricted sandbox environment.</li>
<li>Attacker crafts a malicious tar archive containing symbolic links pointing outside the intended sandbox directory. These symlinks are designed to target specific files or directories on the host system that the attacker wishes to overwrite.</li>
<li>Attacker uploads the malicious tar archive to the OpenClaw instance using the SSH sandbox tar upload functionality.</li>
<li>OpenClaw extracts the contents of the uploaded tar archive without properly validating or restricting the target paths of the symbolic links.</li>
<li>During extraction, the symbolic links are followed, causing files to be written outside the intended sandbox directory.</li>
<li>The attacker overwrites arbitrary files on the remote host with attacker-controlled content.</li>
<li>The attacker achieves arbitrary code execution or persistence by overwriting critical system files or configuration files.</li>
<li>The attacker escalates privileges by modifying binaries used by privileged users.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows a remote attacker with low privileges to write arbitrary files on the OpenClaw server. This can lead to a variety of impacts, including arbitrary code execution, privilege escalation, and denial of service. An attacker could potentially gain complete control over the OpenClaw server by overwriting critical system files. Given the potential for complete system compromise, this vulnerability poses a significant risk to organizations using affected versions of OpenClaw.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade OpenClaw to version 2026.3.31 or later to patch CVE-2026-41364.</li>
<li>Deploy the Sigma rule &ldquo;Detect Suspicious Tar Archive Upload with Symlinks&rdquo; to detect attempts to upload malicious tar archives containing symbolic links.</li>
<li>Monitor SSH logs for suspicious activity related to tar archive uploads to the OpenClaw instance.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>symlink</category><category>file-write</category><category>sandbox-escape</category></item><item><title>compressing npm Package Symlink Bypass Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-04-compressing-symlink-bypass/</link><pubDate>Sat, 18 Apr 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-compressing-symlink-bypass/</guid><description>A vulnerability in the `compressing` npm package (&lt;=v2.1.0) allows for arbitrary file overwrite via symlink path traversal, bypassing a previous patch for CVE-2026-24884.</description><content:encoded><![CDATA[<p>The <code>compressing</code> npm package (v2.1.0 and earlier) contains a critical vulnerability that permits arbitrary file overwrites due to a symlink path traversal bypass. This bypass affects the patch for CVE-2026-24884. The vulnerability arises from an incomplete validation in the <code>isPathWithinParent</code> utility, where path string checks are performed without verifying the filesystem state, specifically symbolic links. By cloning a malicious repository containing a pre-existing symbolic link, a victim unknowingly plants a &ldquo;poisoned path&rdquo; on their system. The attacker can then craft a malicious archive that, when extracted by the vulnerable library, follows the symlink and overwrites arbitrary files. The ease of exploitation via <code>git clone</code> makes this vulnerability particularly dangerous.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker creates a malicious Git repository containing a symbolic link (e.g., <code>config_file</code>) pointing to a sensitive target file or directory (e.g., <code>/tmp/fake_root/etc/passwd</code>).</li>
<li>Attacker generates a malicious payload (e.g., <code>payload.tar</code>) containing a file with the same name as the symbolic link (e.g., <code>config_file</code>) and uploads both to their Git repository.</li>
<li>Victim clones the attacker&rsquo;s Git repository using <code>git clone</code>. This action automatically restores the symbolic link on the victim&rsquo;s system.</li>
<li>Victim runs an application that utilizes the vulnerable <code>compressing</code> library to extract the <code>payload.tar</code> archive.</li>
<li>The <code>compressing</code> library&rsquo;s <code>isPathWithinParent</code> function resolves the path to the file being extracted. Due to lack of <code>lstat</code> checks, the symbolic link is not detected.</li>
<li>The <code>fs.writeFile</code> function follows the symlink, writing the contents of the file from <code>payload.tar</code> to the targeted sensitive file (e.g., <code>/tmp/fake_root/etc/passwd</code>).</li>
<li>Arbitrary file overwrite occurs, potentially leading to privilege escalation or code execution.</li>
<li>Attacker achieves persistent access or control by overwriting critical system files.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to overwrite arbitrary files on the victim&rsquo;s system, potentially leading to privilege escalation by modifying sensitive system files such as <code>/etc/passwd</code>. Remote Code Execution (RCE) can be achieved by overwriting executable binaries or startup scripts. Data corruption can also occur through the modification of application data or database files. This vulnerability impacts developers and organizations using the <code>compressing</code> library up to version v2.1.0 when extracting untrusted archives.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>compressing</code> npm package to a patched version that includes proper symlink handling. This is the primary remediation.</li>
<li>Inspect Git repositories for suspicious symbolic links before cloning. Use <code>git ls-tree -r &lt;commit-ish&gt; | grep 120000</code> to search for symlinks in a repository.</li>
<li>Implement runtime monitoring for file writes to unexpected locations based on the <code>compressing</code> library&rsquo;s activity. Create a detection rule based on <code>process_creation</code> and <code>file_event</code> to detect writes to sensitive directories such as <code>/etc</code> by processes spawned by Node.js that also load the vulnerable <code>compressing</code> module.</li>
<li>Monitor network connections originating from processes related to the <code>compressing</code> library after file extraction. Create a Sigma rule based on <code>network_connection</code> and <code>process_creation</code> to detect unusual outbound connections after archive extraction.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>npm</category><category>supply-chain</category><category>symlink</category><category>directory-traversal</category><category>privilege-escalation</category><category>arbitrary-file-overwrite</category></item><item><title>Dell AppSync 4.6.0 UNIX Symbolic Link Following Vulnerability (CVE-2026-22767)</title><link>https://feed.craftedsignal.io/briefs/2026-04-dell-appsync-symlink/</link><pubDate>Wed, 01 Apr 2026 13:16:33 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-dell-appsync-symlink/</guid><description>Dell AppSync version 4.6.0 is vulnerable to a UNIX Symbolic Link (Symlink) Following vulnerability (CVE-2026-22767) that allows a low-privileged local attacker to tamper with information.</description><content:encoded><![CDATA[<p>Dell AppSync version 4.6.0 contains a UNIX Symbolic Link (Symlink) Following vulnerability, identified as CVE-2026-22767. This vulnerability enables a low-privileged attacker with local access to exploit the system and potentially tamper with sensitive information. The vulnerability was disclosed on April 1, 2026. Defenders should be aware of the potential for local privilege escalation and information tampering due to this vulnerability. Addressing this vulnerability is critical to maintaining the integrity and confidentiality of data managed by Dell AppSync.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker gains local access to the system running Dell AppSync 4.6.0.</li>
<li>Attacker identifies a directory writable by low-privileged users where AppSync improperly handles symlinks.</li>
<li>Attacker creates a malicious symbolic link pointing to a sensitive system file (e.g., <code>/etc/shadow</code>, configuration files).</li>
<li>AppSync, while performing its normal operations, follows the symbolic link created by the attacker.</li>
<li>AppSync attempts to access or modify the target file through the symlink.</li>
<li>Due to insufficient permission checks, AppSync inappropriately overwrites, reads, or modifies the sensitive file.</li>
<li>Attacker leverages the modified sensitive file to escalate privileges or gain unauthorized access.</li>
<li>Attacker achieves the objective of information tampering by modifying application data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-22767 can lead to information tampering on systems running Dell AppSync 4.6.0. A low-privileged attacker with local access could potentially modify system or application configurations, leading to unauthorized access or disruption of services. The impact includes potential data corruption, privilege escalation, and a compromise of the overall system security posture.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the security update provided by Dell as detailed in DSA-2026-163 to remediate CVE-2026-22767 (<a href="https://www.dell.com/support/kbdoc/en-us/000446965/dsa-2026-163-security-update-for-dell-appsync-vulnerabilities">https://www.dell.com/support/kbdoc/en-us/000446965/dsa-2026-163-security-update-for-dell-appsync-vulnerabilities</a>).</li>
<li>Implement the &ldquo;Detect Suspicious Symlink Creation&rdquo; Sigma rule to identify potentially malicious symlink activity on systems running Dell AppSync.</li>
<li>Monitor file system events for unexpected modifications to sensitive files, particularly those targeted by symlinks, using the &ldquo;Detect Sensitive File Tampering via Symlink&rdquo; Sigma rule.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>symlink</category><category>dell</category><category>appsync</category><category>privilege-escalation</category></item><item><title>RegPwnBOF Registry Symlink Race Condition Exploit</title><link>https://feed.craftedsignal.io/briefs/2024-01-regpwnbof/</link><pubDate>Thu, 19 Mar 2026 05:23:44 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-regpwnbof/</guid><description>RegPwnBOF exploits a registry symlink race condition in the Windows Accessibility ATConfig mechanism, enabling a normal user to write arbitrary values to protected HKLM registry keys for persistence and privilege escalation.</description><content:encoded><![CDATA[<p>RegPwnBOF is an exploit leveraging a registry symlink race condition within the Windows Accessibility ATConfig mechanism. This vulnerability allows an unprivileged user to manipulate protected areas of the registry, specifically HKLM, which are typically reserved for administrators or system processes. By exploiting this race condition, an attacker can write arbitrary values to these protected keys. The initial report surfaced around March 2026, highlighting the potential for unauthorized persistence and privilege escalation. This circumvents standard Windows security controls, posing a significant risk to system integrity and confidentiality. The exploit&rsquo;s accessibility to non-administrator users makes it particularly dangerous in environments where least-privilege principles are not strictly enforced.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An unprivileged user initiates the ATConfig mechanism within the Windows Accessibility features.</li>
<li>The exploit creates a registry symlink pointing to a protected HKLM key.</li>
<li>A race condition is triggered during the ATConfig process, allowing the exploit to bypass security checks.</li>
<li>The attacker leverages this race condition to overwrite the target HKLM registry key with arbitrary data.</li>
<li>The modified registry key is used to establish persistence, for example, by creating a Run key.</li>
<li>Upon system restart or user login, the malicious payload associated with the modified Run key is executed.</li>
<li>The attacker gains elevated privileges by executing code within the context of a privileged process.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of RegPwnBOF allows an attacker to gain persistent access to a compromised system and escalate their privileges to administrator level. This can lead to complete system compromise, data theft, and the installation of malware. The impact is magnified by the fact that this exploit can be triggered by a normal user, bypassing traditional access controls. The number of potential victims is considerable, as the vulnerability exists within the Windows Accessibility features, which are enabled by default on many systems.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Monitor registry modifications targeting HKLM keys, especially those related to Accessibility features, using a process_creation log source and the provided Sigma rules.</li>
<li>Implement strict access controls and least-privilege principles to limit the ability of unprivileged users to interact with system-level configurations.</li>
<li>Investigate any unusual registry symlink creation events using file_event logs, particularly those involving the ATConfig mechanism, to identify potential RegPwnBOF exploitation attempts.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>registry</category><category>symlink</category><category>race-condition</category><category>accessibility</category><category>privilege-escalation</category><category>persistence</category><category>windows</category></item><item><title>Kata Containers CopyFile Policy Subversion via Symlinks</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-kata-containers-copyfile-symlink/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-kata-containers-copyfile-symlink/</guid><description>An oversight in the CopyFile policy in Kata Containers allows untrusted hosts to write to arbitrary locations inside the guest workload image via symlinks, enabling binary overwrites and data exfiltration.</description><content:encoded><![CDATA[<p>An oversight in the CopyFile policy within Kata Containers allows a malicious host to manipulate guest workload images. The vulnerability stems from insufficient validation within the <code>CopyFileRequest</code> policy, specifically related to symlink creation. The policy primarily checks the destination path of copied files but fails to adequately validate the target of symlinks created via the same API. This flaw was discovered by @calonso-nv and impacts environments where the <code>genpolicy</code> implementation is used to prevent host access to container images, including Confidential Containers workloads which rely on strong isolation. If the guest image is not protected from the host (e.g., when using unprotected host pull), the system is not vulnerable. The affected package is <code>go/github.com/kata-containers/kata-containers</code> versions prior to <code>0.0.0-20260422180503-1b9e49eb2763</code>.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies a target file within the guest container image, such as a binary or configuration file they wish to overwrite.</li>
<li>The attacker crafts a <code>CopyFileRequest</code> to create a symbolic link within the <code>/run/kata-containers/shared/containers</code> directory.</li>
<li>The <code>path</code> parameter of the request specifies the location of the symlink within the shared directory.</li>
<li>The <code>data</code> parameter of the request specifies the target of the symbolic link, which points to the target file identified in step 1, inside the guest file system.</li>
<li>The Kata Agent processes the <code>CopyFileRequest</code>, creating the symbolic link within the shared directory, pointing to the target file inside the container image.</li>
<li>The attacker crafts a second <code>CopyFileRequest</code> to copy malicious data into the symlink created in step 5.</li>
<li>The Kata Agent writes the malicious data to the symlink, which then overwrites the original target file within the container image.</li>
<li>The attacker restarts the container or waits for the compromised binary to be executed, achieving arbitrary code execution within the guest.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to overwrite arbitrary files within container images managed by Kata Containers. This can lead to arbitrary code execution within the guest environment, data exfiltration, and privilege escalation. This is particularly critical in Confidential Containers environments where the trust model explicitly forbids host access to container images. Affected systems are those employing the upstream <code>genpolicy</code> implementation.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the patch or upgrade to <code>go/github.com/kata-containers/kata-containers</code> version <code>0.0.0-20260422180503-1b9e49eb2763</code> or later to address CVE-2026-41326.</li>
<li>Monitor the creation of symbolic links within the <code>/run/kata-containers/shared/containers</code> directory, using the provided Sigma rule, as this is an unusual operation (file_event).</li>
<li>Implement strict access controls and monitoring for the Kata Agent to prevent unauthorized <code>CopyFileRequest</code> messages.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>kata-containers</category><category>container-escape</category><category>symlink</category></item><item><title>OpenClaw Symlink Race Condition Allows Sandbox Escape</title><link>https://feed.craftedsignal.io/briefs/2024-01-openclaw-symlink/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-openclaw-symlink/</guid><description>A time-of-check/time-of-use (TOCTOU) race condition in OpenClaw versions 2026.4.21 and earlier allows a symlink swap to redirect filesystem writes outside the intended sandbox mount root, potentially leading to arbitrary file modification.</description><content:encoded><![CDATA[<p>OpenClaw, a tool available via npm, contains a vulnerability in versions 2026.4.21 and earlier that could allow for a sandbox escape. This vulnerability stems from a time-of-check/time-of-use (TOCTOU) race condition during filesystem writes within the OpenShell sandbox environment. An attacker could potentially exploit this vulnerability by manipulating symlinks to redirect write operations outside of the intended local mount root. This can occur because OpenClaw does not properly validate the target of write operations against the mount root, leaving it susceptible to symlink-based redirection attacks. Successful exploitation could allow an attacker to modify sensitive files outside the sandbox. The vulnerability is fixed in version 2026.4.22.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious OpenClaw package or leverages an existing package.</li>
<li>The package contains a symlink within the intended sandbox directory.</li>
<li>The OpenClaw application attempts to write to a file via the symlink.</li>
<li>Between the time OpenClaw checks the symlink and the time it performs the write operation, the attacker replaces the symlink with a new symlink pointing outside the intended sandbox root.</li>
<li>OpenClaw, due to the TOCTOU race condition, writes to the file location pointed to by the new symlink, which resides outside the sandbox.</li>
<li>This allows the attacker to overwrite or modify arbitrary files on the system.</li>
<li>The attacker leverages this capability to gain elevated privileges or compromise sensitive data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability could allow an attacker to bypass the intended security restrictions of the OpenClaw sandbox. An attacker could potentially overwrite system files, inject malicious code into existing applications, or steal sensitive data. While the exact number of affected installations is unknown, any system running a vulnerable version of OpenClaw is susceptible to this attack.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to OpenClaw version 2026.4.22 or later to patch the vulnerability (reference: Affected Packages / Versions).</li>
<li>Monitor file system events for unexpected modifications outside of the expected OpenClaw sandbox directory. Deploy the Sigma rule <code>Detect OpenClaw Sandbox Escape via Symlink</code> to detect potential exploitation attempts.</li>
<li>Implement stricter file system access controls to limit the potential impact of successful exploitation (reference: Impact).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>sandbox-escape</category><category>symlink</category><category>race-condition</category><category>npm</category></item><item><title>Apko DirFS Symlink Path Traversal Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-apko-path-traversal/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-apko-path-traversal/</guid><description>A symlink-following path traversal vulnerability exists in apko versions prior to 1.2.5 allowing a malicious .apk file to create a symbolic link pointing outside the build root and subsequently modify files on the host system.</description><content:encoded><![CDATA[<p>A path traversal vulnerability exists in apko&rsquo;s <code>DirFS</code> component, specifically within the <code>sanitizePath</code> helper function in versions prior to 1.2.5. The vulnerability allows a malicious <code>.apk</code> file to install a <code>TypeSymlink</code> tar entry pointing outside the intended build root. Subsequent directory creation or file writing operations could then traverse this symbolic link, leading to unauthorized access and modification of files on the host system. This issue affects users of apko and downstream tools, such as melange, that embed vulnerable versions of the <code>pkg/apk/fs</code> package. The vulnerability was addressed in apko version 1.2.5 with the introduction of <code>*os.Root</code>, which prevents path traversal.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious <code>.apk</code> file containing a <code>TypeSymlink</code> tar entry.</li>
<li>The symbolic link&rsquo;s target is set to a path outside the intended build root, potentially targeting sensitive system directories.</li>
<li>The malicious <code>.apk</code> is processed using a vulnerable version of apko (prior to 1.2.5) via commands like <code>apko build-cpio</code> or through disk-backed consumers such as <code>melange</code>.</li>
<li>During tar extraction, the vulnerable <code>sanitizePath</code> function fails to properly resolve or refuse the malicious symlink.</li>
<li>A subsequent directory-creation or file-write operation is initiated within the same or a later archive entry.</li>
<li>The file operation traverses the previously created symbolic link, gaining access to the file system location outside the intended build root.</li>
<li>The attacker can then create directories or write files to the compromised location, potentially overwriting critical system files or injecting malicious code.</li>
<li>Successful exploitation can lead to privilege escalation and persistent compromise of the host system.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to write files to arbitrary locations on the host system. This can lead to privilege escalation if the attacker can overwrite setuid binaries or modify system configuration files. It can also lead to persistent compromise of the system if the attacker injects malicious code into startup scripts or other system files. While the exact number of victims is unknown, any system running a vulnerable version of apko (prior to 1.2.5) or tools embedding vulnerable versions of <code>pkg/apk/fs</code>, such as melange, is potentially at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade apko to version 1.2.5 or later. This version includes a fix that prevents path traversal vulnerabilities as described in the advisory and commit <a href="https://github.com/chainguard-dev/apko/commit/f5a96e1299ac81c7ea9441705ec467688086f442">f5a96e1</a>.</li>
<li>If upgrading is not immediately feasible, avoid consuming APKs from untrusted sources. However, note that this does not fully eliminate the risk.</li>
<li>Monitor file creation events in sensitive directories for unexpected activity, especially after processing <code>.apk</code> files.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>path-traversal</category><category>symlink</category><category>apko</category><category>vulnerability</category><category>CVE-2026-42574</category></item></channel></rss>