CVE-2026-46354: Coder PKCS#7 Signature Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-6x44-w3xg-hqqf
CVSS 9.1
CWE-347
Published
Advisory Summary

CVE-2026-46354 is a CRITICAL (CVSS 9.1) pkcs#7 signature bypass vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Coder libraries in the Go ecosystem. The issue involves pkcs#7 signature bypass in azure instance identity allows unauthenticated agent token theft. Remediation is available by upgrading affected packages to version 2.33.3, 2.32.2, 2.31.12, 2.30.8, 2.29.13, 2.24.5.

CVE-2026-46354 at a Glance

CVE Identifier CVE-2026-46354
GHSA Identifier GHSA-6x44-w3xg-hqqf
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Coder
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-46354

To remediate this vulnerability, upgrade all affected Coder dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/coder/coder/v2 fixed: 2.33.3
Upgrade github.com/coder/coder/v2 to 2.33.3
github.com/coder/coder/v2 fixed: 2.32.2
Upgrade github.com/coder/coder/v2 to 2.32.2
github.com/coder/coder/v2 fixed: 2.31.12
Upgrade github.com/coder/coder/v2 to 2.31.12
github.com/coder/coder/v2 fixed: 2.30.8
Upgrade github.com/coder/coder/v2 to 2.30.8
github.com/coder/coder/v2 fixed: 2.29.13
Upgrade github.com/coder/coder/v2 to 2.29.13
github.com/coder/coder/v2 fixed: 2.24.5
Upgrade github.com/coder/coder/v2 to 2.24.5
github.com/coder/coder fixed: Latest secure release
Upgrade github.com/coder/coder to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/coder/coder/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-46354, inspect your project dependencies for Coder:

inspect dependencies for github.com/coder/coder/v2

Analyze the terminal output to locate any version of Coder in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.33.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Coder, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary `azureidentity.Validate()` verifies that the PKCS#7 signer certificate chains to a trusted Azure CA but never verifies the PKCS#7 signature itself. An attacker can embed a legitimate Azure certificate alongside arbitrary content e.g. `{"vmId":"<target>"}` and the forged `vmId` will be accepted returning the victim workspace agent's session token. **No authentication is required.** The attacker only needs to know a target VM's `vmId` which is a `UUIDv4`. > that's a practical limitation which would typically require prior access to be exploited ## Root Cause In unpatched Coder releases the signature over the PKCS#7 content is not validated - only the signing certificate is checked. ## Impact An attacker on any Azure VM or with access to a publicly available Azure IMDS certificate from CT logs can: 1. **Steal an agent session token** by sending a forged PKCS#7 envelope to `POST /api/v2/workspaceagents/azure-instance-identity` which is unauthenticated. 2. **With the stolen token** access: - **Git SSH private key** via `GET /workspaceagents/me/gitsshkey`: push to repositories and impersonate the workspace owner. - **OAuth access tokens** via `GET /workspaceagents/me/external-auth`: GitHub, GitLab, and Bitbucket tokens in plaintext. - **Workspace secrets** via the agent manifest: environment variables, file paths, and API keys. ## Attack Path Diagram <img width="5588" height="4176" alt="PKCS7_diagram (1)" src="https://github.com/user-attachments/assets/74e88a89-a995-450d-87ab-6feed03579a5" /> ## Affected Versions All versions of Coder v2 are affected. ## Patches Fixed in [#25286 ](https://github.com/coder/coder/pull/25286) The fix was backported to all supported release lines: | Patched Versions | | --- | | [**v2.33.3**](https://github.com/coder/coder/releases/tag/v2.33.3) | | [**v2.32.2**](https://github.com/coder/coder/releases/tag/v2.32.2) | | [**v2.31.12**](https://github.com/coder/coder/releases/tag/v2.31.12) | | [**v2.30.8**](https://github.com/coder/coder/releases/tag/v2.30.8) | | [**v2.29.13**](https://github.com/coder/coder/releases/tag/v2.29.13) | | [**v2.24.5**](https://github.com/coder/coder/releases/tag/v2.24.5) | ## Workarounds If unable to patch we recommend immediately reconfiguring any Azure templates to use token authentication rather than `azure-instance-identity` until the patch is released and you are fully upgraded. 1. Modify the [`coder_agent.auth`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#auth-1) value to be `token`. 2. Add `CODER_AGENT_TOKEN=${coder_agent.main.token}` to the set of environment variables for the Coder Workspace Agent initialization script. ## Recognition We'd like to thank [Ben Tran](https://github.com/bencalif) of [calif.io](http://calif.io) and Anthropic’s Security Team (`ANT-2026-22445`) for independently disclosing this issue!

CVE-2026-46354 Affected Coder Versions

7 component(s)
Fixed Versions:
2.33.32.32.22.31.122.30.82.29.132.24.5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/coder/coder/v2
Go
≥ 2.33.0-rc.0
< 2.33.3
2.33.3
github.com/coder/coder/v2
Go
≥ 2.32.0-rc.0
< 2.32.2
2.32.2
github.com/coder/coder/v2
Go
≥ 2.31.0
< 2.31.12
2.31.12
github.com/coder/coder/v2
Go
≥ 2.30.0
< 2.30.8
2.30.8
github.com/coder/coder/v2
Go
≥ 2.29.0
< 2.29.13
2.29.13
github.com/coder/coder/v2
Go
< 2.24.5
2.24.5
github.com/coder/coder
Go
≤ 0.27.3

References

Frequently Asked Questions

What is CVE-2026-46354?
CVE-2026-46354 is a security vulnerability in Coder involving PKCS#7 signature bypass in Azure instance identity allows unauthenticated agent token theft under CWE-347: Improper Verification of Cryptographic Signature.
Which Coder versions are affected?
Affected versions include releases prior to 2.33.3, 2.32.2, 2.31.12, 2.30.8, 2.29.13, 2.24.5 across affected packages: github.com/coder/coder/v2, github.com/coder/coder.
What version fixes CVE-2026-46354?
Upgrading to 2.33.3, 2.32.2, 2.31.12, 2.30.8, 2.29.13, 2.24.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/coder/coder/v2 affected?
Yes, github.com/coder/coder/v2 is affected in releases prior to 2.33.3, 2.32.2, 2.31.12, 2.30.8, 2.29.13, 2.24.5. Upgrade your dependency to 2.33.3, 2.32.2, 2.31.12, 2.30.8, 2.29.13, 2.24.5 or later.
Is github.com/coder/coder affected?
Yes, github.com/coder/coder is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-46354?
CVE-2026-46354 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-46354?
CVE-2026-46354 is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check Go dependencies for CVE-2026-46354?
Run the dependency tree command: 'inspect dependencies for github.com/coder/coder/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6x44-w3xg-hqqf",
  "modified" : "2026-05-19T20:04:13Z",
  "published" : "2026-05-19T20:04:13Z",
  "aliases" : [ "CVE-2026-46354" ],
  "summary" : "Coder: PKCS#7 signature bypass in Azure instance identity allows unauthenticated agent token theft",
  "details" : "## Summary\n\n`azureidentity.Validate()` verifies that the PKCS#7 signer certificate chains to a trusted Azure CA but never verifies the PKCS#7 signature itself. An attacker can embed a legitimate Azure certificate alongside arbitrary content e.g. `{\"vmId\":\"<target>\"}` and the forged `vmId` will be accepted returning the victim workspace agent's session token.\n\n**No authentication is required.** The attacker only needs to know a target VM's `vmId` which is a `UUIDv4`.\n> that's a practical limitation which would typically require prior access to be exploited\n\n## Root Cause\n\nIn unpatched Coder releases the signature over the PKCS#7 content is not validated - only the signing certificate is checked.\n\n## Impact\n\nAn attacker on any Azure VM or with access to a publicly available Azure IMDS certificate from CT logs can:\n\n1. **Steal an agent session token** by sending a forged PKCS#7 envelope to `POST /api/v2/workspaceagents/azure-instance-identity` which is unauthenticated.\n2. **With the stolen token** access:\n   - **Git SSH private key** via `GET /workspaceagents/me/gitsshkey`: push to repositories and impersonate the workspace owner.\n   - **OAuth access tokens** via `GET /workspaceagents/me/external-auth`: GitHub, GitLab, and Bitbucket tokens in plaintext.\n   - **Workspace secrets** via the agent manifest: environment variables, file paths, and API keys.\n\n## Attack Path Diagram\n\n<img width=\"5588\" height=\"4176\" alt=\"PKCS7_diagram (1)\" src=\"https://github.com/user-attachments/assets/74e88a89-a995-450d-87ab-6feed03579a5\" />\n\n## Affected Versions\n\nAll versions of Coder v2 are affected.\n\n## Patches\n\nFixed in [#25286 ](https://github.com/coder/coder/pull/25286)\n\nThe fix was backported to all supported release lines:\n\n| Patched Versions |\n| --- |\n| [**v2.33.3**](https://github.com/coder/coder/releases/tag/v2.33.3) |\n| [**v2.32.2**](https://github.com/coder/coder/releases/tag/v2.32.2) |\n| [**v2.31.12**](https://github.com/coder/coder/releases/tag/v2.31.12) |\n| [**v2.30.8**](https://github.com/coder/coder/releases/tag/v2.30.8) |\n| [**v2.29.13**](https://github.com/coder/coder/releases/tag/v2.29.13) |\n| [**v2.24.5**](https://github.com/coder/coder/releases/tag/v2.24.5) |\n\n## Workarounds\n\nIf unable to patch we recommend immediately reconfiguring any Azure templates to use token authentication rather than `azure-instance-identity` until the patch is released and you are fully upgraded.\n\n1. Modify the [`coder_agent.auth`](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent#auth-1) value to be `token`.\n2. Add `CODER_AGENT_TOKEN=${coder_agent.main.token}` to the set of environment variables for the Coder Workspace Agent initialization script.\n\n## Recognition\n\nWe'd like to thank [Ben Tran](https://github.com/bencalif) of [calif.io](http://calif.io) and Anthropic’s Security Team (`ANT-2026-22445`) for independently disclosing this issue!",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.33.0-rc.0"
      }, {
        "fixed" : "2.33.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.32.0-rc.0"
      }, {
        "fixed" : "2.32.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.31.0"
      }, {
        "fixed" : "2.31.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.30.0"
      }, {
        "fixed" : "2.30.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.29.0"
      }, {
        "fixed" : "2.29.13"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.24.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/coder/coder"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.27.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/security/advisories/GHSA-6x44-w3xg-hqqf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/pull/25286"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/coder/coder"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.24.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.29.13"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.30.8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.31.12"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.32.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coder/coder/releases/tag/v2.33.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-19T20:04:13Z",
    "nvd_published_at" : null
  }
}