JWT Signature Not Validated
JWT validation is configured to skip signature verification (ValidateIssuerSigningKey / RequireSignedTokens = false, or a SignatureValidator that returns the token unchecked), so forged or 'alg:none' tokens are accepted (CWE-347).
Standards mapping
- OWASP Top 10
- A02:2021 - Cryptographic Failures
- OWASP ASVS
- V3.5.3 (L1)
Vulnerable vs. safe
ValidateIssuerSigningKey = false,ValidateIssuerSigningKey = true,Why it matters & how to fix it
JWT validation is configured to skip signature verification (ValidateIssuerSigningKey / RequireSignedTokens = false, or a SignatureValidator that returns the token unchecked), so forged or 'alg:none' tokens are accepted (CWE-347). Require signed tokens, keep ValidateIssuerSigningKey = true, and pin the accepted algorithms via TokenValidationParameters.ValidAlgorithms.
References
Rule ID integsec.csharp.auth.jwt-signature-not-validated - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - Authentication & SecretsHardcoded JWT Secret
- JavaScript / TypeScript - Authentication & SecretsHardcoded Secret
- JavaScript / TypeScript - Authentication & SecretsInsecure Cookie Flags
- JavaScript / TypeScript - Authentication & SecretsJWT Algorithm None
- JavaScript / TypeScript - Authentication & SecretsJWT Decode Without Verify
- JavaScript / TypeScript - Authentication & SecretsTLS Verification Disabled