Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-q926-c743-49qj
No affected components available
Summary
Centrifugo 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.
Note: 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.
Details
The flag is defined in internal/configtypes/types.go:
InsecureSkipTokenSignatureVerify bool `mapstructure:"insecure_skip_token_signature_verify"`
It is passed directly to token verification in internal/client/handler.go:
token, err := h.tokenVerifier.VerifyConnectToken(e.Token,
cfg.Client.InsecureSkipTokenSignatureVerify)
In token_verifier_jwt.go, when skipVerify=true the entire signature block is bypassed:
if !skipVerify {
// This block never executes
err = verifier.verifySignature(token)
}
The flag is configurable via multiple vectors making accidental exposure likely:
- Config file:
insecure_skip_token_signature_verify: true - Environment variable:
CENTRIFUGO_INSECURE_SKIP_TOKEN_SIGNATURE_VERIFY=true - YAML, TOML config formats
Despite hmac_secret_key being configured, startup logs show "enabled JWT verifiers" — falsely implying verification is active.
PoC
Config with legitimate HMAC key but skip flag enabled:
{
"client": {
"insecure_skip_token_signature_verify": true,
"token": { "hmac_secret_key": "legitimate-production-secret-key" }
}
}
Token signed with completely wrong key is fully accepted:
VULNERABILITY CONFIRMED!
Connected as user: {'client': '899dec73...', 'version': '0.0.0 OSS'}
No security warning emitted when insecure_skip_token_signature_verify=true:
Token signed with wrong key accepted, authentication bypass confirmed:
skipVerify flag propagated from config to all token verification calls:
Impact
- Any unauthenticated user can connect as any arbitrary user ID
- Complete authentication bypass — attacker sets any
subclaim value - No indicators in logs that the server is operating insecurely
- Easily triggered accidentally via environment variable injection in containerized deployments (e.g. misconfigured Kubernetes secrets)
- Affects all connection types: WebSocket, HTTP-streaming, SSE, GRPC
Suggested Fix
- Emit a loud startup warning when flag is enabled:
if cfg.Client.InsecureSkipTokenSignatureVerify {
log.Warn().Msg("SECURITY WARNING: JWT signature verification is " +
"DISABLED via insecure_skip_token_signature_verify - " +
"DO NOT use in production!")
}
- Consider requiring an additional explicit
insecure_mode: trueflag to prevent accidental single-flag misconfiguration - Log a warning on every accepted token when skip is active
The vulnerability can be exploited over the network without needing physical access. It is difficult for an attacker to exploit this vulnerability and may require special conditions. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists.
No exploitation activity has been observed at this time. Continue routine monitoring.
Probability that this vulnerability will be exploited in the wild within the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard