github.com/centrifugal/centrifugo/v6
Affected
- introduced
0, fixed6.7.0(semver)
Fixed versions
6.7.0
Fix
- Fixed version
6.7.0go get github.com/centrifugal/centrifugo/[email protected]
Advisory
Also known as: GO-2026-4703
Centrifugo's InsecureSkipTokenSignatureVerify flag silently disables JWT verification with no warning
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:
insecure_skip_token_signature_verify: trueCENTRIFUGO_INSECURE_SKIP_TOKEN_SIGNATURE_VERIFY=trueDespite 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:
1
Token signed with wrong key accepted, authentication bypass confirmed:
2
skipVerify flag propagated from config to all token verification calls:
3
Impact
sub claim valueSuggested Fix
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!")
}
insecure_mode: true flag to prevent accidental single-flag misconfigurationLow Basis: The source's own band: LOW
0, fixed 6.7.0 (semver)6.7.0
6.7.0go get github.com/centrifugal/centrifugo/[email protected]0, last affected 2.4.0 (semver)None listed
No fixed version is listed.
0, last affected 3.2.3 (semver)None listed
No fixed version is listed.
0, last affected 4.1.5 (semver)None listed
No fixed version is listed.
0, last affected 5.4.9 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0