GHSA-6x44-w3xg-hqqf

Suggest an improvement
Source
https://github.com/advisories/GHSA-6x44-w3xg-hqqf
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-6x44-w3xg-hqqf/GHSA-6x44-w3xg-hqqf.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-6x44-w3xg-hqqf
Aliases
  • CVE-2026-46354
Published
2026-05-19T20:04:13Z
Modified
2026-05-19T20:15:16.331425630Z
Severity
  • 9.1 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N CVSS Calculator
Summary
Coder: PKCS#7 signature bypass in Azure instance identity allows unauthenticated agent token theft
Details

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!

Database specific
{
    "severity": "CRITICAL",
    "cwe_ids": [
        "CWE-347"
    ],
    "nvd_published_at": null,
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-19T20:04:13Z"
}
References

Affected packages

Go
github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.33.0-rc.0
Fixed
2.33.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-6x44-w3xg-hqqf/GHSA-6x44-w3xg-hqqf.json"
github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.32.0-rc.0
Fixed
2.32.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-6x44-w3xg-hqqf/GHSA-6x44-w3xg-hqqf.json"
github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.31.0
Fixed
2.31.12

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-6x44-w3xg-hqqf/GHSA-6x44-w3xg-hqqf.json"
github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.30.0
Fixed
2.30.8

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-6x44-w3xg-hqqf/GHSA-6x44-w3xg-hqqf.json"
github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
2.29.0
Fixed
2.29.13

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-6x44-w3xg-hqqf/GHSA-6x44-w3xg-hqqf.json"
github.com/coder/coder/v2

Package

Name
github.com/coder/coder/v2
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder/v2

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.24.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-6x44-w3xg-hqqf/GHSA-6x44-w3xg-hqqf.json"
github.com/coder/coder

Package

Name
github.com/coder/coder
View open source insights on deps.dev
Purl
pkg:golang/github.com/coder/coder

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Last affected
0.27.3

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-6x44-w3xg-hqqf/GHSA-6x44-w3xg-hqqf.json"