jwt-algorithm-confusion

jwt-algorithm-confusion is a skill for Claude Code, Codex from ShulkwiSEC/bb-huge. It costs 58 tokens per session (970 once invoked), scanned A, original, MIT.

A security testing guide for JWT algorithm-confusion flaws, where a server verifies a token with the wrong type of cryptographic key. JWTs are signed tokens commonly used for API login sessions and permissions.

In plain words
What is it for?
Testing JWT-based authentication in APIs and web applications, including attempts to forge tokens using a server's public key.
Why use it?
It helps find cases where an attacker could change a token's claims, such as changing a regular user to an administrator, without the intended secret key.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is > - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain pat.

Good fit Testing JWT-based authentication in APIs and web applications, including attempts to forge tokens using a server's public key.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ShulkwiSEC/bb-huge
agentmods
npx agentmods add skills/shulkwisec/bb-huge/jwt-algorithm-confusion

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jwt-algorithm-confusion

README.md
[![agentmods](https://agentmods.dev/badge/skills/shulkwisec/bb-huge/jwt-algorithm-confusion/github.svg)](https://agentmods.dev/skills/shulkwisec/bb-huge/jwt-algorithm-confusion)
Your own site
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/jwt-algorithm-confusion"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/jwt-algorithm-confusion/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jwt-algorithm-confusion

Your own site · 80×15
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/jwt-algorithm-confusion"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/jwt-algorithm-confusion.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 970 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00058 $0.00970
Opus 5 $0.00029 $0.00485
Sonnet 5 $0.00012 $0.00194
Haiku 4.5 $0.00006 $0.00097

Measured 7d ago against content hash e4fcc16329b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

jwt-algorithm-confusion scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/curated/jwt-algorithm-confusion/SKILL.md · 124 lines

How it starts

The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JWT Algorithm Confusion

When to Use

  • When testing APIs or web applications that use JWTs for session management or authentication.
  • To attempt to forge arbitrary JWTs (e.g., escalating to 'admin') when the application utilizes an asymmetric signature algorithm (like RS256) and the application's public key can be obtained.

Prerequisites

  • Authorized scope and target URLs from bug bounty program
  • Burp Suite Professional (or Community) configured with browser proxy
  • Familiarity with OWASP Top 10 and common web vulnerability classes
  • SecLists wordlists for fuzzing and enumeration

Workflow

Phase 1: Reconnaissance (Finding the Public Key)

# Concept: JWT Algorithm Confusion ```

### Phase 2: Intercepting and Modifying the JWT Header

```json
// {
  "alg": "HS256",
  "typ": "JWT"
}

Phase 3: Modifying the Payload (Privilege Escalation)

// {
  "user": "attacker",
  "role": "admin",
  "iat": 1716260400
}

Phase 4: Signing the Forged JWT

# jwt_tool.py [ENCODED_HEADER].[ENCODED_PAYLOAD] -S hs256 -k public_key.pem
Decision Point 🔀
flowchart TD
    A[Forge JWT ] --> B{Server Accepts? ]}
    B -->|Yes| C[Exploit API ]
    B -->|No| D[Check None Alg ]
    C --> E[Document Flaw ]

🔵 Blue Team Detection & Defense

  • Enforce Algorithm Verification: Library Updates: Public Key Secrecy (Symmetric fallback): Key Concepts | Concept | Description | |---------|-------------|

Output Format

Jwt Algorithm Confusion — Assessment Report
============================================================
Target: [Target identifier]
Assessor: [Operator name]
Date: [Assessment date]
Scope: [Authorized scope]
MITRE ATT&CK: [Relevant technique IDs]

Findings Summary:
  [Finding 1]: [Severity] — [Brief description]
  [Finding 2]: [Severity] — [Brief description]

Detailed Results:
  Phase 1: [Phase name]
    - Result: [Outcome]
    - Evidence: [Screenshot/log reference]
    - Impact: [Business impact assessment]

Read the full file on GitHub · 124 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 124 lines · 58 tokens per session scan A e4fcc16329b0

Subscribe to this mod's changes

jwt-algorithm-confusion is a skill published in the GitHub repository ShulkwiSEC/bb-huge (22 stars, last pushed 2mo ago), licensed MIT. It adds 58 tokens to every session and 970 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

jwt-algorithm-confusion

Identify and exploit Algorithm Confusion vulnerabilities in JSON Web Tokens (JWT). This skill details how to bypass signature verification by changing the signing algorithm from asymmetric (RS256) to symmetric (HS256) and using the public key as the symmetric secret.

akashrpatil/awesome-offensive-security-skills · 58 tokens

jwt-forgery-algorithm-confusion

Exploit implementations of JSON Web Tokens (JWT) through algorithmic confusion (e.g., RS256 to HS256), "none" algorithm attacks, and signature stripping. Use this skill to forge administration tokens and achieve unauthenticated Account Takeover (ATO) on REST APIs and modern web applications.

akashrpatil/awesome-offensive-security-skills · 70 tokens

testing-api-authentication-weaknesses

Tests API authentication mechanisms for weaknesses including broken token validation, missing authentication on endpoints, weak password policies, credential stuffing susceptibility, token leakage in URLs or logs, and session management flaws. The tester evaluates JWT implementation, API key handling, OAuth flows, and…

xalgorix/xalgorix · 102 tokens

implementing-jwt-signing-and-verification

JSON Web Tokens (JWT) defined in RFC 7519 are compact, URL-safe tokens used for authentication and authorization in web applications. This skill covers implementing secure JWT signing with HMAC-SHA256.

xalgorix/xalgorix · 50 tokens

testing-api-authentication-weaknesses

Tests API authentication mechanisms for weaknesses including broken token validation, missing authentication on endpoints, weak password policies, credential stuffing susceptibility, token leakage in URLs or logs, and session management flaws. The tester evaluates JWT implementation, API key handling, OAuth flows, and…

Njones17/AI-agent-master-cyber-skills-list · 102 tokens

implementing-jwt-signing-and-verification

JSON Web Tokens (JWT) defined in RFC 7519 are compact, URL-safe tokens used for authentication and authorization in web applications. This skill covers implementing secure JWT signing with HMAC-SHA256.

Njones17/AI-agent-master-cyber-skills-list · 50 tokens