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

Published May 19, 2026
·
Updated

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="PKCS7diagram (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 coderagent.auth value to be token. 2. Add CODERAGENTTOKEN=${coderagent.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!

Other sources

Coder allows organizations to provision remote development environments via Terraform. In versions prior tp 2.24.5, 2.29.13, 2.30.8, 2.31.12, 2.32.2, and 2.33.3, 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. Versions 2.24.5, 2.29.13, 2.30.8, 2.31.12, 2.32.2, and 2.33.3 patch the issue. As a workaround, reconfigure any Azure templates to use token authentication rather than azure-instance-identity.

MITRE

Affected Software

13 affected componentsFixes available
go/github.com/coder/coder<=0.27.3
go/github.com/coder/coder/v2<2.24.5
2.24.5
go/github.com/coder/coder/v2>=2.29.0<2.29.13
2.29.13
go/github.com/coder/coder/v2>=2.30.0<2.30.8
2.30.8
go/github.com/coder/coder/v2>=2.31.0<2.31.12
2.31.12
go/github.com/coder/coder/v2>=2.32.0-rc.0<2.32.2
2.32.2
go/github.com/coder/coder/v2>=2.33.0-rc.0<2.33.3
2.33.3
Coder Coder Go<2.24.5
Coder Coder Go>=2.29.0<2.29.13
Coder Coder Go>=2.30.0<2.30.8
Coder Coder Go>=2.31.0<2.31.12
Coder Coder Go>=2.32.0<2.32.2
Coder Coder Go>=2.33.0<2.33.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/coder/coder/v2 to a version that resolves this vulnerability.

    Fixed in 2.24.5
  2. Upgrade

    Upgrade go/github.com/coder/coder/v2 to a version that resolves this vulnerability.

    Fixed in 2.29.13
  3. Upgrade

    Upgrade go/github.com/coder/coder/v2 to a version that resolves this vulnerability.

    Fixed in 2.30.8
  4. Upgrade

    Upgrade go/github.com/coder/coder/v2 to a version that resolves this vulnerability.

    Fixed in 2.31.12
  5. Upgrade

    Upgrade go/github.com/coder/coder/v2 to a version that resolves this vulnerability.

    Fixed in 2.32.2
  6. Upgrade

    Upgrade go/github.com/coder/coder/v2 to a version that resolves this vulnerability.

    Fixed in 2.33.3
  7. Upgrade

    Upgrade Coder v2 to a version that resolves this vulnerability.

    Fixed in 2.24.5
  8. Upgrade

    Upgrade Coder v2 to a version that resolves this vulnerability.

    Fixed in 2.29.13
  9. Upgrade

    Upgrade Coder v2 to a version that resolves this vulnerability.

    Fixed in 2.30.8
  10. Upgrade

    Upgrade Coder v2 to a version that resolves this vulnerability.

    Fixed in 2.31.12
  11. Upgrade

    Upgrade Coder v2 to a version that resolves this vulnerability.

    Fixed in 2.32.2
  12. Upgrade

    Upgrade Coder v2 to a version that resolves this vulnerability.

    Fixed in 2.33.3
  13. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch #25286
  14. Configuration

    Modify the `coder_agent.auth` value to be `token` (workaround until upgraded), rather than using `azure-instance-identity`.

    Coder (Terraform) agent auth configuration coder_agent.auth = token
  15. Configuration

    Add `CODER_AGENT_TOKEN=${coder_agent.main.token}` to the set of environment variables for the Coder Workspace Agent initialization script.

    Coder Workspace Agent initialization script CODER_AGENT_TOKEN = ${coder_agent.main.token}
  16. Compensating control

    Reconfigure Azure templates to use token authentication rather than `azure-instance-identity` until you are fully upgraded and patched.

Event History

May 19, 2026
Advisory Published
via GitHub·08:04 PM
Data Sourced
via GitHub·08:04 PM
DescriptionSeverityWeaknessAffected Software
Jul 7, 2026
CVE Published
via MITRE·09:10 PM
Data Sourced
via MITRE·09:10 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-46354?

The severity of CVE-2026-46354 is critical with a score of 9.1.

2

How do I fix CVE-2026-46354?

To fix CVE-2026-46354, update to the latest version of the affected software as provided in the official releases.

3

What impact does CVE-2026-46354 have on my system?

CVE-2026-46354 allows an attacker to embed a forged `vmId` alongside a legitimate Azure certificate, which can compromise security.

4

What software is affected by CVE-2026-46354?

The affected software includes go/github.com/coder/coder/v2 and go/github.com/coder/coder.

5

When was CVE-2026-46354 published?

CVE-2026-46354 was published on May 19, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203