offensive-jwt

offensive-jwt is a skill for Claude Code, Codex from Miosa-osa/OSA. It costs 97 tokens per session (3,038 once invoked), scanned A, a copy of offensive-jwt, Apache-2.0.

A security testing guide for JSON Web Tokens, or JWTs, which are signed data tokens commonly used to identify users and authorize requests. It covers mistakes in token algorithms, keys, headers, caching, storage, and encryption use.

In plain words
What is it for?
Testing web and mobile authentication systems for JWT algorithm confusion, weak secrets, unsafe header handling, cache poisoning, timing leaks, and insecure token storage.
Why use it?
It helps find token flaws that could let someone forge identity data, redirect key lookups, or reuse stolen credentials.

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 {"alg":"HS256","typ":"JWT","kid":"../../../../dev/null"}.

Good fit Testing web and mobile authentication systems for JWT algorithm confusion, weak secrets, unsafe header handling, cache poisoning, timing leaks, and insecure token storage.

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/Miosa-osa/OSA
agentmods
npx agentmods add skills/miosa-osa/osa/offensive-jwt

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 offensive-jwt

README.md
[![agentmods](https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-jwt/github.svg)](https://agentmods.dev/skills/miosa-osa/osa/offensive-jwt)
Your own site
<a href="https://agentmods.dev/skills/miosa-osa/osa/offensive-jwt"><img src="https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-jwt/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 offensive-jwt

Your own site · 80×15
<a href="https://agentmods.dev/skills/miosa-osa/osa/offensive-jwt"><img src="https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-jwt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,038 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod 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.00097 $0.03038
Opus 5.5 $0.00039 $0.01215
Sonnet 5.5 $0.00019 $0.00608
Haiku 4.5 $0.00010 $0.00304

Measured 2mo ago against content hash b284c9550e89, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

offensive-jwt scanned grade A with 1 finding 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 2mo ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -H "Authorization: Bearer <api_key>" https://api.target/resource
Origin

This is a copy

92% identical to offensive-jwt — 50 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

priv/skills/offensive-jwt/SKILL.md · 315 lines

How it starts

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

Overview

Comprehensive JWT attack checklist for offensive security engagements. Follow steps in order; apply each technique to the current target context and track which items have been completed.

Quick Reference: Misconfigurations to Check

  • Algorithm set to none — signature verification bypassed entirely
  • Algorithm switching between RSA and HMAC (confusion attack)
  • Weak or guessable HMAC secret (brute-forceable)
  • kid, jku, jwk, x5u header parameters accepted without validation
  • Expired or tampered tokens accepted by server
  • Sensitive data stored unencrypted in payload

Useful tool: JWT Tool

Mechanisms

JWTs (RFC 7519) consist of three Base64URL-encoded parts: header.payload.signature.

Signing algorithms:

Algorithm Type Notes
HS256/384/512 Symmetric HMAC Shared secret; confusion target
RS256/384/512 Asymmetric RSA Public key can be misused as HMAC secret
ES256/384/512 Asymmetric ECDSA
PS256/384/512 RSASSA-PSS
EdDSA (Ed25519/Ed448) Asymmetric
none Unsigned Critically insecure

Additional pitfalls:

  • JWS/JWE confusion: server accepts encrypted token (JWE) where signed (JWS) is expected, or fails open on unexpected typ/cty
  • JWKS retrieval: SSRF via jku/x5u, insecure TLS, poisoned key caching, kid collisions
  • Token binding (DPoP, mTLS): incorrectly implemented allows replay from other clients

Hunt: Identifying JWT Usage

  1. Check Authorization: Bearer <token> headers in all requests
  2. Look for cookies containing JWT structures (eyJ...)
  3. Examine browser local/session storage
  4. Decode the token at jwt.io or via BurpSuite JWT extension — inspect claims and header parameters
  5. Note any kid, jku, jwk, x5u fields in the header — these are attack surfaces

Vulnerability Map

JWT Vulnerabilities
├── Algorithm Bypass
│   ├── alg:none attack
│   └── RS256→HS256 confusion (public key as HMAC secret)
├── Weak Secret Key → Brute force
├── kid Parameter Injection
│   ├── SQL injection via kid
│   └── Path traversal via kid
├── Header Injection
│   ├── jwk (inline fake key)
│   ├── jku/x5u (remote attacker-controlled JWKS)
│   └── JWKS cache poisoning
└── Missing / Broken Validation
    ├── No signature check
    ├── Expired tokens accepted
    └── iss/aud/exp not validated

Read the full file on GitHub · 315 lines

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. 2mo ago First seen · 315 lines · 97 tokens per session scan A b284c9550e89

Subscribe to this mod's changes

offensive-jwt is a skill published in the GitHub repository Miosa-osa/OSA (82 stars, last pushed 4d ago), licensed Apache-2.0. It adds 97 tokens to every session and 3,038 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). It is 92% identical to offensive-jwt, differing in 50 lines, and is treated as a copy.

Related

offensive-jwt compared with skills from other repositories

offensive-jwt next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
offensive-jwtMiosa-osa/OSASkill824d agoApache-2.0A97Claude Code, Codex
n8n-mcp-workflowsMRWillisT/PullNexusSkill87mo agononeA35Claude Code
open-sourcebrowser-use/browser-useSkill123ktodayMITA101Claude Code
fastapi-patternsaffaan-m/ECCSkill316k2d agoMITA35Claude Code, Kiro
stripe-projectsNousResearch/hermes-agentSkill268ktodayMITA15Claude Code, Codex
statusmem0ai/mem0Skill70k7d agoApache-2.0A54Claude Code
mem0-test-integrationmem0ai/mem0Skill70k7d agoApache-2.0A207Claude Code, Codex