Skip to main content
skill CX Codex

api-auth-and-jwt-abuse — Claude Code skill: JWT and API auth testing

A playbook for probing bearer tokens, API keys and claim trust. Useful when an API leans on JWT or request headers for identity.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add yaklang/hack-skills --skill api-auth-and-jwt-abuse -a claude-code
Open on GitHub

What api-auth-and-jwt-abuse does

The skill starts with token triage: alg, kid, jku, x5u, then role and scope claims, then issuer and audience mismatches. A quick-test table follows — unsigned tokens with a trailing dot, RS256 switched to HS256 with the public key as secret, path traversal in kid, an attacker-controlled jku or x5u, offline cracking of a weak secret against targeted wordlists.

Another section covers hidden fields and mass assignment: role, isAdmin, verified, plan, tier, permissions, owner. Rate-limit bypass gets its own list — X-Forwarded-For, X-Real-IP, Forwarded, User-Agent rotation, path case and slash variants. For GraphQL it names arrays of login mutations, bulk object fetches with varying IDs, and repeated password reset calls inside one request.

This is for people already testing an API, their own or someone else's, who know what they are doing: you get vectors, not an automated scanner. The last section routes you onward to GraphQL and hidden parameters, authentication bypass, deeper JWT and OAuth work, OIDC misconfiguration, and CORS origin trust bugs.

What it helps with

  • check whether an API accepts an unsigned token
  • crack a weak JWT secret offline
  • get past a request limit by spoofing IP headers
  • try mass assignment on an isAdmin field
  • build a test chain for GraphQL batching

Example prompts for the agent

  • pull apart this JWT: check alg, kid and the role claims
  • see if the rate limit falls to an X-Forwarded-For header
  • run the api-auth-and-jwt-abuse checks against this API

How to install api-auth-and-jwt-abuse

1Skills CLI (Vercel)

npx skills add yaklang/hack-skills --skill api-auth-and-jwt-abuse -a claude-code

2Manually: put the files in place

~/.claude/skills/api-auth-and-jwt-abuse/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/api-auth-and-jwt-abuse/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about api-auth-and-jwt-abuse

How do I install api-auth-and-jwt-abuse in Claude?

Run npx skills add yaklang/hack-skills --skill api-auth-and-jwt-abuse -a claude-code. The skill lands at ~/.claude/skills/api-auth-and-jwt-abuse/SKILL.md.

What does api-auth-and-jwt-abuse do?

It walks through token and header trust: alg, kid, jku and x5u checks, role and org claim tampering, rate-limit bypass. It also points to related skills for GraphQL, OAuth and CORS.

Which platforms does it support?

Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Each has its own install path and skill folder.

Source text

SKILL.md · MIT
---
name: api-auth-and-jwt-abuse
description: >-
  API authentication and JWT abuse playbook. Use when testing bearer tokens, API keys, claim trust, header spoofing, rate limits, and API auth boundary weaknesses.
---

# SKILL: API Auth and JWT Abuse — Token Trust, Header Tricks, and Rate Limits

> **AI LOAD INSTRUCTION**: Use this skill when APIs rely on JWT, bearer tokens, API keys, or weak request identity signals. Focus on token trust boundaries, claim misuse, header spoofing, and rate-limit bypass.

## 1. TOKEN TRIAGE

Inspect:

- `alg`, `kid`, `jku`, `x5u`
- role, org, tenant, scope, or privilege claims
- issuer and audience mismatches
- reuse of mobile and web tokens across products

## 2. QUICK ATTACK PICKS

| Pattern | First Test |
|---|---|
| `alg:none` acceptance | unsigned token with trailing dot |
| RS256 confusion | switch to HS256 using public key as secret |
| `kid` lookup trust | path traversal or injection in `kid` |
| remote key fetch trust | attacker-controlled `jku` or `x5u` |
| weak secret | offline crack with targeted wordlists |

## 3. HIDDEN FIELDS AND BATCH ABUSE

### Mass assignment field picks

```text
role
isAdmin
admin
verified
plan
tier
permissions
org
owner
```

### Rate limit and batch abuse picks

```text
X-Forwarded-For: 1.2.3.4
X-Real-IP: 5.6.7.8
Forwarded: for=9.9.9.9
```

GraphQL or JSON batch abuse candidates:

- arrays of login mutations
- bulk object fetches with varying IDs
- repeated password reset or verification calls in one request

## 4. RATE LIMIT BYPASS FAMILIES

```text
X-Forwarded-For
X-Real-IP
Forwarded
User-Agent rotation
Path case / slash variants
```

## 5. NEXT ROUTING

- For GraphQL batching and hidden parameters: [graphql and hidden parameters](../graphql-and-hidden-parameters/SKILL.md)
- For default credential and brute-force planning: [authentication bypass](../authbypass-authentication-flaws/SKILL.md)
- For full JWT and OAuth depth: [jwt oauth token attacks](../jwt-oauth-token-attacks/SKILL.md)
- For OAuth or OIDC configuration flaws in browser and SSO flows: [oauth oidc misconfiguration](../oauth-oidc-misconfiguration/SKILL.md)
- For credentialed browser reads and origin trust bugs: [cors cross origin misconfiguration](../cors-cross-origin-misconfiguration/SKILL.md)

© yaklang · MIT · yaklang/hack-skills

Similar skills

Everything for Security →

From the same set93

business-logic-vulnerabilities A playbook for business logic bugs: race conditions, price tampering, workflow bypass, coupon abuse. Useful when the scanner finds nothing. CX Codex +1 3,900installs api-sec Routes API security testing across REST, GraphQL, and mobile backends. Helps an agent choose the right testing track before running deep checks. CX Codex +1 3,900installs xss-cross-site-scripting A skill that feeds your coding agent non-obvious XSS vectors: context-specific payloads, WAF and CSP bypass. CX Codex +1 3,900installs waf-bypass-techniques A skill offering WAF evasion methods for injection testing. It guides payload mutation through encoding, chunked requests, and parser discrepancies. CX Codex +1 3,800installs 401-403-bypass-techniques A playbook for access-denied responses: what to try when an admin panel or API endpoint answers 401 or 403. CX Codex +1 3,800installs api-recon-and-docs A playbook skill for mapping REST, mobile, and GraphQL API surfaces. It finds hidden routes, OpenAPI schemas, and legacy version drift before testing. CX Codex +1 3,800installs idor-broken-object-authorization A testing playbook for IDOR, BOLA and BFLA: where object identifiers hide, how to run A-B tests, and how to chain a finding into privilege escalation. CX Codex +1 3,800installs jwt-oauth-token-attacks A skill for Claude and other AI editors that walks through attacks on JWT tokens and OAuth 2.0 flows. Useful when you need to check how an app trusts tokens and keys. CX Codex +1 3,800installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor