ESC
Rust · JWT & JWE toolkit

Break and harden JSON Web Tokens.

A fast, single-binary CLI for encoding, decoding, cracking, and attacking JWT and JWE tokens.

$ cargo install jwt-hack
10subcommands
13signing algorithms
1.44Mcrack keys / sec
30+attack payloads
Capabilities

One binary, the whole JWT attack surface.

From a quick decode to a full vulnerability scan, every step of JWT and JWE assessment lives in a single fast command.

jwt-hack crack

Crack weak secrets

Recover signing secrets by dictionary or brute force, with hosted wordlist presets and DEFLATE-aware parsing. Parallelised across every core.

$ jwt-hack crack -w rockyou.txt <token>
tried 812,043 keys · 1.44M/s
● FOUND secret = s3cr3t-key
jwt-hack scan

Scan for flaws

Automated checks for the classic JWT vulnerabilities.

CRIT HIGH MED PASS
encode / decode

Encode & decode

Build and inspect JWT and JWE tokens with custom headers and DEFLATE compression.

jwt-hack verify

Verify signatures

Check symmetric and asymmetric signatures against a secret or key, with expiry validation.

jwt-hack payload

Forge attack payloads

Generate none-alg, algorithm-confusion, kid injection, and jku / x5u variants in one pass.

jwks

Attack JWKS endpoints

Fetch, spoof, verify, and rotate against JWKS key sets to probe key-management weaknesses.

--json · server · mcp

Automate everything

Machine-readable JSON on every command, a REST API server, and an MCP server for AI-driven analysis.

Broad, modern coverage.

Current token formats and algorithms, kept close to the specifications your targets actually run.

Signing
HS256HS384HS512 RS256RS384RS512 ES256ES384ES512 PS256PS384PS512 EdDSAnone
Encryption
A128GCMA256GCM RSA-OAEPECDH-ES A128KWA256KW dir
Formats
JWTJWE DEFLATEJWKS
Interfaces
CLI--json REST APIMCPshell
The scanner

From token to findings in one command.

Point jwt-hack scan at a token and it decodes, tries weak secrets, replays attack payloads, and grades every finding by severity. Export the result as JSON or HTML.

  1. Decode the token and read its structure
  2. Probe for none-alg and algorithm confusion
  3. Attempt to crack the signing secret
  4. Write a graded --report for the assessment

Get running in seconds.

Ships as a single static binary. Install it your way, then decode your first token.

$cargo install jwt-hack
$brew install jwt-hack
$sudo snap install jwt-hack
$docker pull ghcr.io/hahwul/jwt-hack
first run

Decode a token

No config, no setup. Pass a token and read it back.

$ jwt-hack decode <token>
$ jwt-hack encode '{"sub":"1"}' --secret=key
$ jwt-hack scan <token> --report out.html

Built in the open.

jwt-hack is MIT-licensed and community-driven. Star it, file an attack you want covered, or send a pull request.