{"id":"GHSA-q926-c743-49qj","aliases":["GO-2026-4703"],"url":"https://o3.security/vulnerability/GHSA-q926-c743-49qj","summary":"Centrifugo's InsecureSkipTokenSignatureVerify flag silently disables JWT verification with no warning","details":"### Summary\nCentrifugo supports a configuration flag `insecure_skip_token_signature_verify` that completely disables JWT signature verification. When enabled, Centrifugo accepts any JWT token regardless of signature validity — including tokens signed with wrong keys, random signatures, or no signature at all. Critically, no warning is logged at startup or runtime when this flag is active, making it invisible to operators and security auditors.\n\nNote: This vulnerability requires the operator to have explicitly set insecure_skip_token_signature_verify=true. The core issue is the absence of any warning when this flag is active, making accidental production exposure undetectable.\n\n### Details\nThe flag is defined in `internal/configtypes/types.go`:\n```\nInsecureSkipTokenSignatureVerify bool `mapstructure:\"insecure_skip_token_signature_verify\"`\n```\n\nIt is passed directly to token verification in `internal/client/handler.go`:\n```\ntoken, err := h.tokenVerifier.VerifyConnectToken(e.Token, \n    cfg.Client.InsecureSkipTokenSignatureVerify)\n```\n\nIn `token_verifier_jwt.go`, when `skipVerify=true` the entire signature block is bypassed:\n```go\nif !skipVerify {\n    // This block never executes\n    err = verifier.verifySignature(token)\n}\n```\nThe flag is configurable via multiple vectors making accidental exposure likely:\n- Config file: `insecure_skip_token_signature_verify: true`\n- Environment variable: `CENTRIFUGO_INSECURE_SKIP_TOKEN_SIGNATURE_VERIFY=true`\n- YAML, TOML config formats\n\nDespite `hmac_secret_key` being configured, startup logs show `\"enabled JWT verifiers\"` — falsely implying verification is active.\n\n### PoC\nConfig with legitimate HMAC key but skip flag enabled:\n```json\n{\n  \"client\": {\n    \"insecure_skip_token_signature_verify\": true,\n    \"token\": { \"hmac_secret_key\": \"legitimate-production-secret-key\" }\n  }\n}\n```\n\nToken signed with completely wrong key is fully accepted:\n```\nVULNERABILITY CONFIRMED!\nConnected as user: {'client': '899dec73...', 'version': '0.0.0 OSS'}\n```\n\nNo security warning emitted when insecure_skip_token_signature_verify=true:\n![1](https://github.com/user-attachments/assets/606acae0-e6f7-467f-b512-b5350ec6cf38)\n\nToken signed with wrong key accepted, authentication bypass confirmed:\n![2](https://github.com/user-attachments/assets/a400c0bf-b78c-40cf-8c73-07fdabb0c672)\n\nskipVerify flag propagated from config to all token verification calls:\n![3](https://github.com/user-attachments/assets/4141eb05-0371-46e1-acb7-8a9091c45693)\n\n### Impact\n- Any unauthenticated user can connect as any arbitrary user ID\n- Complete authentication bypass — attacker sets any `sub` claim value\n- No indicators in logs that the server is operating insecurely\n- Easily triggered accidentally via environment variable injection\n  in containerized deployments (e.g. misconfigured Kubernetes secrets)\n- Affects all connection types: WebSocket, HTTP-streaming, SSE, GRPC\n \n### Suggested Fix\n1. Emit a loud startup warning when flag is enabled:\n```go\nif cfg.Client.InsecureSkipTokenSignatureVerify {\n    log.Warn().Msg(\"SECURITY WARNING: JWT signature verification is \" +\n        \"DISABLED via insecure_skip_token_signature_verify - \" + \n        \"DO NOT use in production!\")\n}\n```\n2. Consider requiring an additional explicit `insecure_mode: true` flag to prevent accidental single-flag misconfiguration\n3. Log a warning on every accepted token when skip is active","published":"2026-03-13T20:44:37Z","modified":"2026-03-27T21:32:35.952658Z","cvss":{"score":0,"severity":"NONE","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/centrifugal/centrifugo/v6","fixedVersion":"6.7.0"},{"ecosystem":"Go","name":"github.com/centrifugal/centrifugo","fixedVersion":null},{"ecosystem":"Go","name":"github.com/centrifugal/centrifugo/v3","fixedVersion":null},{"ecosystem":"Go","name":"github.com/centrifugal/centrifugo/v4","fixedVersion":null},{"ecosystem":"Go","name":"github.com/centrifugal/centrifugo/v5","fixedVersion":null}],"fix":{"url":"https://github.com/centrifugal/centrifugo/commit/dab80fe3adfe0bbeca3bb3ea45e6d95df9f601a8","label":"centrifugal/centrifugo@dab80fe"},"references":[{"type":"WEB","url":"https://github.com/centrifugal/centrifugo/security/advisories/GHSA-q926-c743-49qj"},{"type":"WEB","url":"https://github.com/centrifugal/centrifugo/commit/dab80fe3adfe0bbeca3bb3ea45e6d95df9f601a8"},{"type":"PACKAGE","url":"https://github.com/centrifugal/centrifugo"},{"type":"WEB","url":"https://github.com/centrifugal/centrifugo/releases/tag/v6.7.0"},{"type":"WEB","url":"https://pkg.go.dev/vuln/GO-2026-4703"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-03-27T21:32:35.952658Z"}}