advisory-mining
Mine GitHub Security Advisories and CVE databases for incomplete fixes, finding variant vulnerabilities in patched code or…
Detect JWT implementation vulnerabilities including algorithm confusion, none algorithm acceptance, weak secrets, and JWK injection attacks.
Claude Code
$ npx -y skills add ByamB4/find-cve-agent --skill jwt-attacks --agent claude-code
Codex
$ npx skills add ByamB4/find-cve-agent --skill jwt-attacks -a codex -y
Cursor
$ npx skills add ByamB4/find-cve-agent --skill jwt-attacks -a cursor -y
Gemini CLI
$ npx skills add ByamB4/find-cve-agent --skill jwt-attacks -a gemini-cli -y
GitHub Copilot
$ npx skills add ByamB4/find-cve-agent --skill jwt-attacks -a github-copilot -y
OpenCode
$ npx skills add ByamB4/find-cve-agent --skill jwt-attacks -a opencode -y
Windsurf
$ npx skills add ByamB4/find-cve-agent --skill jwt-attacks -a windsurf -y
name: jwt-attacks
description: "Detect JWT implementation vulnerabilities including algorithm confusion, none algorithm acceptance, weak secrets, and JWK injection attacks."
metadata:
filePattern:
- "**/*.js"
- "**/*.ts"
- "**/*.py"
- "**/*.go"
bashPattern:
- "grep.*(jwt|jsonwebtoken|jose|JWK|JWS)"
priority: 82Audit JWT verification/generation libraries, authentication implementations, and any code that validates or creates JSON Web Tokens.
The server uses RS256 (asymmetric) but the attacker changes the token header to HS256 (symmetric) and signs with the public key as the HMAC secret.
**Conditions**: Library accepts algorithm from token header without allowlist validation.
Token header specifies `"alg": "none"`, and the library accepts unsigned tokens.
**Conditions**: Library does not validate algorithm or allows "none".
Attacker embeds their own public key in the token header via the `jwk` parameter, and the library uses it for verification.
HMAC secrets that are short, common words, or default values. Can be brute-forced offline.
`jku` (JWK Set URL) or `x5u` (X.509 URL) in header points to attacker-controlled server hosting a JWK Set with the attacker key.
grep -rn "jwt\.verify\|jwt\.decode\|jwt\.sign\|jwt\.encode" . grep -rn "jsonwebtoken\|jose\|PyJWT\|go-jose\|nimbus-jose" . grep -rn "JWTVerify\|jwtVerify\|createRemoteJWKSet" .
grep -rn "algorithms\|algorithm.*=\|alg.*:" . | grep -i jwt
Is the algorithm explicitly specified or taken from the token header?
// VULNERABLE: no algorithm specified
jwt.verify(token, key);
// SAFE: algorithm allowlist
jwt.verify(token, key, { algorithms: ['RS256'] });grep -rn "none\|None\|NONE" . | grep -i "alg\|algorithm"
grep -rn "kid\|keyId\|key_id\|getKey\|keyStore" .
Is the kid value used in file paths, database queries, or command execution?
grep -rn "secret\|SECRET\|JWT_SECRET\|TOKEN_SECRET" .
Is the secret hardcoded, from environment variable, or sufficiently random?
Open Source CVE Hunting Harness for Claude Code A Claude Code plugin that systematically finds real CVEs in open source packages through coordinated multi-agent security research.
Mine GitHub Security Advisories and CVE databases for incomplete fixes, finding variant vulnerabilities in patched code or…
Detect authentication and authorization bypass vulnerabilities including missing auth middleware, JWT algorithm confusion, IDOR,…
Detect code injection vulnerabilities in packages that dynamically generate or evaluate code via new Function(), eval(), vm.run*,…
Detect OS command injection via shell execution sinks where user-controlled input reaches system commands without proper…
Cross-pollination multiplier technique: find a vulnerability in one package, then search for the same pattern across all similar…
Detect decompression bomb vulnerabilities where compressed input can expand to exhaust memory, targeting buffer-based…
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…