Skip to content
Back to skills

Api Broken Auth

ASecurity

Broken Authentication (OWASP API2) — weak token issuance/validation, API keys in URLs, tokens that never expire, missing lockout/rate-limit on auth, weak password reset, and session not invalidated. Tier 1. Cross-references jwt and oauth skills. Use whenever an API has login, tokens, API keys, OTP/2FA, or password reset.

  • 16 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 17, 2026
securitygobashawsgitapibackend

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill api-broken-auth --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Broken Auth?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Broken Auth
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-api-broken-auth/badge)](https://www.skillsdirectory.com/skills/anandjogawade-api-broken-auth)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-broken-auth
description: Broken Authentication (OWASP API2) — weak token issuance/validation, API keys in URLs, tokens that never expire, missing lockout/rate-limit on auth, weak password reset, and session not invalidated. Tier 1. Cross-references jwt and oauth skills. Use whenever an API has login, tokens, API keys, OTP/2FA, or password reset.
---

# API2 — Broken Authentication

Attack how identity is proven and tokens are issued/validated. Flaws here yield account takeover. Payloads: `${CLAUDE_PLUGIN_ROOT}/payloads/auth-jwt.md`.

## Trigger phrases
`api2, broken authentication, api key, token expiry, credential stuffing, password reset, otp brute force, session invalidation, weak auth`

## Method
1. **Token issuance/validation** — decode every token (JWT? opaque?). For JWTs run the full `jwt` skill (alg:none, weak secret, jwk/jku/kid, RS256→HS256). Opaque tokens: test entropy, replay, cross-tenant acceptance.
2. **No expiry** — reuse a token long after issue / after logout / after password change; if still valid → broken session lifecycle. Test `exp`/`aud`/`iss` enforcement.
3. **API keys in the wrong places** — grep JS/APK/git/URLs for keys; test a key with no scoping, no rotation, valid across environments, and whether a **missing** key still grants access.
4. **Credential stuffing / brute-force** — probe login, OTP, and 2FA for missing rate limit/lockout:
   ```bash
   ffuf -u https://TARGET/api/login -X POST -d '{"user":"admin","pass":"FUZZ"}' \
     -H 'Content-Type: application/json' -w rockyou.txt -mc 200 -fr "invalid"
   ```
   bypass limits: rotate `X-Forwarded-For`/`X-Real-IP`, GraphQL alias/batch, JSON-RPC batch (see `api-resource-consumption`).
5. **Password reset** — token predictability/short length/no expiry/reuse; **host-header poisoning** of reset links (`Host: attacker` → poisoned link to victim); reset-token leak via Referer.
6. **Session fixation / no invalidation** — token valid after logout or concurrent-session abuse.

## Bypass / evasion
Rate-limit evasion (headers, case/encoding, verb/version swap); naive filter bypass on `alg`; see `${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md`.

## Modern / rare techniques
- **[RARE] Key-in-URL** — API keys in query strings leak via logs/Referer/proxy history; flag as broken auth even if "working as designed".
- **[RARE] Pre-auth token acceptance** — endpoints that accept an unsigned/empty bearer or default service token.
- **[RARE] OTP/2FA response-based bypass** — status/flag in response controls success, or OTP returned in a sibling response; brute OTP via alias batching.

## Escalation / chaining
Account takeover → chain to `api-bola`/`api-bfla` with the victim/elevated identity. Weak reset → full ATO. Cross-ref `jwt`, `oauth`.

## Backend & tooling
Preferred Kali path (WSL+Kali / Kali-MCP / HexStrike); jwt_tool/hashcat for token crypto. Route through Burp; send manual PoCs to Repeater. See `zazy-orchestrator`.

## Verification (background, before reporting)
Reproduce auth bypass/ATO in a clean session; for rate-limit absence show sustained attempts without lockout. Confirm forged/replayed tokens authenticate as the target. True positives only.

## Evidence
The auth flaw request/response, the forged/replayed/reset token authenticating as victim or surviving invalidation, impact + remediation (short-lived tokens, lockout, MFA, keys out of URLs).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.