Skip to content

GHSA-6x44-w3xg-hqqf CVE-2026-46354 GO-2026-5196

Coder: PKCS#7 signature bypass in Azure instance identity allows unauthenticated agent token theft

Critical Go
Severity
9.1 / 10
Critical · CVSS 3.1
Exploit chance (EPSS)
0.32%
Chance of exploitation in the next 30 days. Higher than 24.77% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-347 Improper Verification of Cryptographic Signature
Fix
2.33.3
Upgrade github.com/coder/coder/v2 to this version or later

Description

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

The fix was backported to all supported release lines:

Patched Versions
v2.33.3
v2.32.2
v2.31.12
v2.30.8
v2.29.13
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 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 of calif.io and Anthropic’s Security Team (ANT-2026-22445) for independently disclosing this issue!

Affected versions

Go

PackageVulnerableFixed in
github.com/coder/coder
<= 0.27.3
No fix yet
github.com/coder/coder
all versions
No fix yet
github.com/coder/coder/v2
>= 2.33.0-rc.0, < 2.33.3
2.33.3
github.com/coder/coder/v2
>= 2.32.0-rc.0, < 2.32.2
2.32.2
github.com/coder/coder/v2
>= 2.31.0, < 2.31.12
2.31.12
github.com/coder/coder/v2
>= 2.30.0, < 2.30.8
2.30.8
github.com/coder/coder/v2
>= 2.29.0, < 2.29.13
2.29.13
github.com/coder/coder/v2
< 2.24.5
2.24.5
github.com/coder/coder/v2
< 2.24.5
>= 2.29.0, < 2.29.13
>= 2.30.0, < 2.30.8
>= 2.31.0, < 2.31.12
>= 2.32.0-rc.0, < 2.32.2
>= 2.33.0-rc.0, < 2.33.3
2.24.5
2.29.13
2.30.8
2.31.12
2.32.2
2.33.3

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

github.com/coder/coder/v2 Go → 2.33.3

go
go get github.com/coder/coder/v2@v2.33.3 && go mod tidy

Severity breakdown

CVSS 3.1 9.1

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Weakness

CWE-347: Improper Verification of Cryptographic Signature

The product does not verify, or incorrectly verifies, the cryptographic signature for data.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-h58c-xccx-75m3
Coder: Stored HTML injection via unescaped ApplicationName and LogoURL appearance settings
Medium Also affects github.com/coder/coder
GHSA-8fxq-53rx-ph5f
Coder: Login endpoint user enumeration via timing-defense placeholder in password comparison
Medium Also affects github.com/coder/coder
GHSA-qrwj-vh9x-gw5v
Coder's workspace agent API insecure redirect handling allowed cross-agent file read and write
High Also affects github.com/coder/coder
GHSA-5wg6-jmq2-53pw
Coder's workspace app CORS origin check can be bypassed via UUID-based subdomain spoofing
Medium Also affects github.com/coder/coder
GHSA-7qw2-f75v-62f7
Coder vulnerable to stored HTML injection via workspace agent logs in AgentLogLine component
Medium Also affects github.com/coder/coder
GHSA-84rm-42xw-mx52
Coder's AI Bridge Proxy skips TLS certificate verification in default configuration
High Also affects github.com/coder/coder
GHSA-wqxv-w64v-5wh6
Suspended Coder users retain access to AI Bridge LLM proxy endpoints
Medium Also affects github.com/coder/coder
GHSA-f5vp-w269-392g
Coder vulnerable to denial of service via unbounded request body in AI Bridge provider endpoints
Medium Also affects github.com/coder/coder
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor