<?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>Instance Identity — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/instance-identity/</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>Tue, 19 May 2026 20:05:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/instance-identity/feed.xml" rel="self" type="application/rss+xml"/><item><title>Coder Azure Instance Identity PKCS#7 Signature Bypass Leads to Unauthenticated Agent Token Theft (CVE-2026-46354)</title><link>https://feed.craftedsignal.io/briefs/2026-05-coder-azure-bypass/</link><pubDate>Tue, 19 May 2026 20:05:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-coder-azure-bypass/</guid><description>Coder is vulnerable to a PKCS#7 signature bypass in Azure instance identity (CVE-2026-46354), allowing unauthenticated agent token theft via a forged vmId, enabling access to Git SSH private keys, OAuth access tokens, and workspace secrets.</description><content:encoded><![CDATA[<p>Coder v2 is susceptible to a critical vulnerability where the <code>azureidentity.Validate()</code> function fails to properly validate the PKCS#7 signature when using Azure instance identity for authentication. This flaw allows an unauthenticated attacker to bypass security measures by embedding a legitimate Azure certificate alongside a forged <code>vmId</code> within a PKCS#7 envelope. Successful exploitation allows retrieval of the victim workspace agent&rsquo;s session token, granting unauthorized access to sensitive resources. The attacker only requires knowledge of the target VM&rsquo;s <code>vmId</code> (UUIDv4), which, while a limitation, could be obtained through prior access or reconnaissance. This vulnerability impacts all versions of Coder v2 prior to the patched versions released in May 2026.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies a target Coder workspace agent and obtains its <code>vmId</code> UUIDv4.</li>
<li>Attacker crafts a malicious PKCS#7 envelope containing a legitimate Azure certificate and a forged <code>vmId</code> targeting the identified workspace.</li>
<li>Attacker sends a <code>POST</code> request to the <code>/api/v2/workspaceagents/azure-instance-identity</code> endpoint with the crafted PKCS#7 envelope. This endpoint is unauthenticated.</li>
<li>Coder&rsquo;s <code>azureidentity.Validate()</code> function incorrectly validates only the signer certificate, failing to verify the PKCS#7 signature itself.</li>
<li>The forged <code>vmId</code> is accepted, and the attacker retrieves the workspace agent&rsquo;s session token.</li>
<li>Attacker uses the stolen token to access the <code>GET /workspaceagents/me/gitsshkey</code> endpoint to retrieve the Git SSH private key.</li>
<li>Attacker uses the stolen token to access <code>GET /workspaceagents/me/external-auth</code> endpoint, exfiltrating OAuth access tokens for GitHub, GitLab, and Bitbucket.</li>
<li>Attacker uses the stolen token to access workspace secrets via the agent manifest, including environment variables, file paths, and API keys.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability (CVE-2026-46354) grants an attacker unauthorized access to sensitive resources within Coder workspaces. This can lead to complete compromise of the workspace, including the ability to push malicious code to repositories using the stolen Git SSH private key, impersonate the workspace owner, and access sensitive environment variables, file paths, and API keys. If an attacker gains access to source code repositories and developer secrets, they can cause significant data breaches, intellectual property theft, and supply chain attacks.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Immediately patch Coder instances to the latest versions (&gt;= v2.33.3, v2.32.2, v2.31.12, v2.30.8, v2.29.13, v2.24.5) to address CVE-2026-46354.</li>
<li>As a temporary workaround, reconfigure Azure templates to use token authentication instead of <code>azure-instance-identity</code>, as described in the advisory. Specifically, modify the <a href="https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#auth-1"><code>coder_agent.auth</code></a> value to <code>token</code>.</li>
<li>Implement the provided Sigma rule to detect suspicious POST requests to the <code>/api/v2/workspaceagents/azure-instance-identity</code> endpoint with potentially crafted PKCS#7 envelopes.</li>
<li>Monitor web server logs for abnormal activity and unauthorized access attempts to the <code>/api/v2/workspaceagents/azure-instance-identity</code>, <code>/workspaceagents/me/gitsshkey</code>, and <code>/workspaceagents/me/external-auth</code> endpoints.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>pkcs7</category><category>azure</category><category>instance identity</category><category>signature bypass</category><category>unauthenticated access</category><category>credential theft</category><category>cve-2026-46354</category><category>coder</category></item></channel></rss>