Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-46354

CVE-2026-46354: Coder Authentication Bypass Vulnerability

CVE-2026-46354 is an authentication bypass flaw in Coder that allows attackers to forge Azure VM identities and steal workspace session tokens. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-46354 Overview

Coder is an open-source platform that provisions remote development environments via Terraform. CVE-2026-46354 is an improper signature verification flaw [CWE-347] in the azureidentity.Validate() function. The function verifies that the PKCS#7 signer certificate chains to a trusted Azure Certificate Authority (CA) but never verifies the PKCS#7 signature itself. An unauthenticated attacker can embed a legitimate Azure certificate alongside arbitrary content such as {"vmId":"<target>"} and receive the victim workspace agent's session token. The vulnerability affects Coder versions prior to 2.24.5, 2.29.13, 2.30.8, 2.31.12, 2.32.2, and 2.33.3.

Critical Impact

Unauthenticated attackers who know a target workspace's vmId (a UUIDv4) can retrieve the workspace agent's session token and impersonate the workspace.

Affected Products

  • Coder versions prior to 2.24.5
  • Coder versions prior to 2.29.13, 2.30.8, 2.31.12, 2.32.2
  • Coder versions prior to 2.33.3

Discovery Timeline

  • 2026-07-07 - CVE-2026-46354 published to NVD
  • 2026-07-08 - Last updated in NVD database

Technical Details for CVE-2026-46354

Vulnerability Analysis

CVE-2026-46354 is a cryptographic signature validation flaw in Coder's Azure instance identity authentication path. The azureidentity.Validate() function accepts a PKCS#7 structure containing a certificate chain and payload. The function correctly walks the certificate chain and confirms it terminates at a trusted Azure CA. However, it fails to cryptographically verify that the payload was actually signed by the private key associated with the presented certificate.

This omission converts a signed attestation check into a certificate presence check. Any attacker able to obtain a valid Azure-issued certificate can bundle it with attacker-controlled JSON and pass validation. The server then treats the forged vmId claim as authentic and issues the workspace agent's session token.

Root Cause

The root cause is a missing signature verification step in the PKCS#7 validation routine. Certificate chain validation and payload signature verification are separate cryptographic operations. Coder implemented only the first. This falls under CWE-347: Improper Verification of Cryptographic Signature.

Attack Vector

Exploitation is network-based and requires no authentication or user interaction. The attacker crafts a PKCS#7 message containing any valid Azure CA-chained certificate and a forged payload specifying the target vmId. The attacker submits this to Coder's Azure instance identity endpoint. Coder responds with the workspace agent session token for the specified vmId.

The practical constraint is discovery of the UUIDv4vmId for a target workspace. UUIDv4 values are not guessable through brute force, so an attacker typically needs prior read access to metadata that exposes the identifier.

No verified public exploit code is available. See the GitHub Security Advisory GHSA-6x44-w3xg-hqqf and the remediation pull request for implementation-level detail.

Detection Methods for CVE-2026-46354

Indicators of Compromise

  • Unexpected calls to the Azure instance identity authentication endpoint from IP addresses outside your Azure VM address ranges.
  • Workspace agent session token issuance events not correlated with a legitimate VM boot or reconnect sequence.
  • Repeated authentication attempts against the Azure identity endpoint referencing multiple vmId values in short succession.

Detection Strategies

  • Audit Coder server access logs for requests to the azure-instance-identity authentication path and compare source IPs against expected Azure metadata service ranges.
  • Correlate workspace agent session token issuance with Azure VM lifecycle events. Tokens issued outside of legitimate provisioning windows warrant investigation.
  • Monitor for anomalous workspace agent activity such as unexpected outbound connections or command execution originating from tokens issued shortly after a suspicious authentication event.

Monitoring Recommendations

  • Ingest Coder application logs into a centralized logging platform and alert on Azure identity validation events.
  • Track the Coder-Version header or server build metadata across your fleet to confirm patched versions are deployed.
  • Baseline normal workspace agent connection patterns and alert on deviations following authentication events.

How to Mitigate CVE-2026-46354

Immediate Actions Required

  • Upgrade Coder to a patched version: 2.24.5, 2.29.13, 2.30.8, 2.31.12, 2.32.2, or 2.33.3 depending on your release track.
  • Rotate workspace agent session tokens for any workspaces that used azure-instance-identity authentication prior to patching.
  • Review access logs for suspicious authentication events since the vulnerable code was deployed.

Patch Information

Coder released fixes across six supported release branches. See the vendor release notes: v2.24.5, v2.29.13, v2.30.8, v2.31.12, v2.32.2, and v2.33.3. The remediation is implemented in pull request #25286, which adds cryptographic verification of the PKCS#7 payload signature.

Workarounds

  • Reconfigure any Azure workspace templates to use token authentication instead of azure-instance-identity.
  • Restrict network access to the Coder server so the Azure identity endpoint is not reachable from untrusted networks until patching is complete.
  • Treat existing workspace agent tokens as potentially compromised and rotate them after upgrading.
bash
# Example: switch a Coder Azure template to token authentication
# In your Terraform template, replace the azure-instance-identity auth block:
resource "coder_agent" "main" {
  os   = "linux"
  arch = "amd64"
  auth = "token"
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.