JWT Attacks
Jump to:
Summary
JWT Attacks exploit vulnerabilities in JSON Web Tokens (JWT) used for authentication and authorization, enabling attackers to bypass security controls or impersonate users.
Key Characteristics
- Manipulation of JWT payloads to escalate privileges or gain unauthorized access.
- Exploitation of weak or missing signature verification.
- Use of algorithm confusion attacks by switching JWT signing algorithms.
- Replay attacks using stolen or intercepted tokens.
- Token tampering to modify claims such as user roles or expiration times.
Defensive Controls
- Implement strict signature verification using strong algorithms like RS256.
- Validate all JWT claims, including expiration and audience fields.
- Use short token lifetimes and refresh tokens securely.
- Employ secure storage and transmission of tokens with HTTPS and secure cookies.
- Regularly rotate signing keys and monitor token usage for anomalies.
Related Security Solutions
Identity and Access Management (IAM) systems, Web Application Firewalls (WAF), API security gateways, and token validation libraries help detect and prevent JWT attacks.
More in Application Attacks