<?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>Portainer — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/portainer/</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, 14 May 2026 16:30:14 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/portainer/feed.xml" rel="self" type="application/rss+xml"/><item><title>Portainer Arbitrary File Read via Git Symlink Injection</title><link>https://feed.craftedsignal.io/briefs/2026-05-portainer-git-symlink-read/</link><pubDate>Thu, 14 May 2026 16:30:14 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-portainer-git-symlink-read/</guid><description>Portainer is vulnerable to an arbitrary file read vulnerability due to Git symlink injection when deploying stacks from Git repositories, allowing authenticated users to read sensitive files accessible to the Portainer process.</description><content:encoded><![CDATA[<p>Portainer is susceptible to an arbitrary file read vulnerability (CVE-2026-44881) stemming from Git symlink injection during stack deployment from Git repositories. An attacker with the ability to create or update Git-backed stacks can exploit this flaw. The vulnerability arises because Portainer uses <code>go-git</code> v5 to clone Git repositories, which translates Git symlink entries into OS symlinks without proper validation, except for <code>.gitmodules</code>. By crafting a repository containing a <code>docker-compose.yml</code> file that is a symbolic link to a sensitive file (e.g., <code>/etc/passwd</code>, Kubernetes service account token), an attacker can trick Portainer into reading and disclosing the contents of the linked file via the <code>GET /api/stacks/{id}/file</code> endpoint. Git-stack auto-update amplifies the issue by allowing deferred exploitation through a malicious commit that replaces <code>docker-compose.yml</code> with a symlink. This vulnerability affects Portainer releases from the introduction of Git-based stack deployment until the fixes in versions 2.33.8, 2.39.2, and 2.41.0.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker creates a Git repository with a <code>docker-compose.yml</code> file configured as a symbolic link to a sensitive file (e.g., <code>/etc/passwd</code>).</li>
<li>The attacker uses the Portainer API or web interface to create a new stack, specifying the attacker-controlled Git repository as the source.</li>
<li>Portainer clones the Git repository using <code>go-git</code>, which creates the symlink on the filesystem.</li>
<li>An authenticated user (admin or non-admin, depending on configuration) triggers the file read by accessing the stack through Portainer&rsquo;s <code>GET /api/stacks/{id}/file</code> endpoint.</li>
<li>Portainer reads the <code>docker-compose.yml</code> file, which resolves to the attacker-specified target file due to the presence of the symlink.</li>
<li>The contents of the sensitive file are returned in the HTTP response to the user who initiated the request.</li>
<li>If auto-update is enabled, an attacker can push a malicious commit to an existing legitimate repository to replace the <code>docker-compose.yml</code> file with a symbolic link.</li>
<li>The file read is then triggered on the next scheduled update cycle with no further interaction required, leaking sensitive data without further user action.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to read arbitrary files accessible to the Portainer process, typically running as root in containerized deployments. This includes sensitive files such as <code>/etc/shadow</code>, <code>/root/.ssh/*</code>, <code>/proc/self/environ</code>, and the Portainer BoltDB (<code>portainer.db</code>) containing user password hashes, API tokens, and agent credentials. In Kubernetes environments, the attacker can read the cluster service account token mounted at <code>/var/run/secrets/kubernetes.io/serviceaccount/token</code>, granting the attacker the Portainer pod&rsquo;s cluster API access. Similarly, Docker Swarm secrets mounted into the Portainer container at <code>/run/secrets/</code> can be exposed. These leaked credentials can lead to onward compromise of managed Docker/Kubernetes environments, container registries, and Portainer itself.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to Portainer version 2.33.8, 2.39.2, or 2.41.0, where the vulnerability is fixed.</li>
<li>Disable <strong>Allow non-admin users to manage their stacks</strong> in environment settings to restrict stack creation to administrators, reducing the attack surface.</li>
<li>Carefully review and avoid deploying Git-backed stacks from untrusted repositories.</li>
<li>Disable auto-update on existing stacks to prevent deferred exploitation.</li>
<li>Deploy the Sigma rule <code>Detect Portainer Stack File Access to Sensitive Paths</code> to identify requests accessing sensitive files through the stack file endpoint.</li>
<li>Audit existing stack working directories for unexpected symlink entries under <code>/data/compose/</code> (or your configured data directory) using <code>find /data/compose -type l</code>.</li>
<li>Patch CVE-2026-44881 across all Portainer instances.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>git</category><category>symlink</category><category>file-read</category><category>portainer</category><category>cve-2026-44881</category><category>vulnerability</category></item></channel></rss>