jwt-attacks

Exploit JWT vulnerabilities like alg:none and key confusion during penetration testing.

253|37|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/blacklanternsecurity/red-run --skill jwt-attacks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: jwt-attacks
Source: https://github.com/blacklanternsecurity/red-run/tree/main/skills/web/jwt-attacks
Command: npx skills add https://github.com/blacklanternsecurity/red-run --skill jwt-attacks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jwt_tool, hashcat, openssl, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps penetration testers identify and exploit vulnerabilities in JSON Web Tokens (JWTs) used for authentication and authorization, enabling privilege escalation or unauthorized access.

Core Features & Use Cases

  • JWT Vulnerability Exploitation: Detects and exploits common JWT flaws like algorithm confusion, weak secrets, and header injection.
  • Token Forgery & Tampering: Allows for the creation of malicious JWTs to impersonate users or gain elevated privileges.
  • Use Case: A penetration tester suspects an application's JWT implementation is flawed. They use this Skill to test for alg:none vulnerabilities, attempt to crack a weak secret, or exploit kid injection to forge an administrator token.

Quick Start

Use the jwt-attacks skill to decode the provided JWT token and identify potential vulnerabilities.

Frequently Asked Questions about jwt-attacks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I exploit JWT alg:none vulnerabilities during penetration testing?

You can test for JWT key confusion by using this Skill to manipulate token headers and exploit asymmetric key management weaknesses, allowing you to forge valid signatures using public keys as HMAC secrets.

What is the best way to crack weak JWT secrets for token forgery?

This Skill identifies and exploits JSON Web Token weaknesses by testing for algorithm confusion, weak secrets, and header injection, allowing penetration testers to achieve privilege escalation or unauthorized access.

Can I use hashcat and jwt_tool to test JWT header injection and kid injection?

Yes, this Skill uses jwt_tool and hashcat to test JWT header injection and kid injection, manipulating key references to forge malicious tokens for privilege escalation during authorized penetration tests.

How do I forge an administrator token by exploiting JWT signature verification flaws?

Prerequisites include having a target JWT token to decode and an authorized penetration testing environment, requiring tools like jwt_tool, hashcat, and openssl to execute token forgery and vulnerability exploitation.

Does this Skill support testing RSA key confusion attacks on JWT tokens?

Next steps involve using the forged JWT to achieve privilege escalation or unauthorized access, validating the token forgery against the target application's authentication and authorization controls.