🔐 JWT Security Scanner
Analyze JSON Web Tokens (JWTs) for common security vulnerabilities and generate professional security reports.
📦 Available on PyPI
Install the tool directly:
pip install jwt-security-scanner
Run the scanner:
jwt-scanner
Windows Users: If
jwt-scanneris not recognized, run:
py -m jwt_scanner.scanner
📖 Project Overview
JWT (JSON Web Token) is widely used for authentication in modern web applications. However, insecure JWT implementations can expose applications to authentication bypass, privilege escalation, token forgery, and unauthorized access.
This project is a Python-based command-line security scanner that analyzes JWTs for common security misconfigurations and generates detailed security reports with remediation recommendations.
🚀 Features
- ✅ Detects 5 common JWT security vulnerability categories
- 🎨 Beautiful colored terminal output using Rich
- 📄 Generates professional HTML security reports
- 📝 Generates text reports for documentation
- 🛡 Provides security recommendations
- ⚡ Simple command-line interface
- 📦 Available as a PyPI package
🔍 Security Checks
| Security Check | Description | Risk |
|---|---|---|
| 🔐 Algorithm Check | Detects insecure none algorithm usage |
🔴 Critical |
| 🔑 Weak Secret Key | Detects commonly used weak HMAC secrets | 🔴 Critical |
| ⏳ Expiry Check | Detects missing or expired tokens | 🟠 High |
| 📄 Sensitive Data | Detects passwords or confidential data in payload | 🟠 High |
| 🛡 Token Claims | Checks missing iss, sub, aud, iat claims |
🟡 Medium |
⚙️ Technologies Used
- Python 3
- PyJWT
- Rich
- Colorama
- Requests
💻 Installation
Install from PyPI
pip install jwt-security-scanner
If pip is unavailable:
py -m pip install jwt-security-scanner
▶️ Usage
Launch the scanner:
jwt-scanner
Or, if the command is not recognized on Windows:
py -m jwt_scanner.scanner
Follow the prompts to paste a JWT token. The scanner will automatically:
- Decode the token
- Perform security analysis
- Display findings
- Generate HTML and TXT reports
📊 Example Output
JWT Security Scanner
SECURITY FINDINGS
CRITICAL Weak Secret Key Found
HIGH No Expiration Time
HIGH Sensitive Data Detected
SECURITY SUMMARY
Critical : 1
High : 2
Medium : 0
Low : 5
Verdict:
CRITICAL VULNERABILITIES FOUND
📄 Reports Generated
Every scan automatically generates:
📝 Text Report
- Plain text format
- Easy to archive
- Useful for documentation
🌐 HTML Report
- Modern responsive design
- Severity dashboard
- Findings table
- Token information
- Security recommendations
📚 What I Learned
- JWT Architecture (Header • Payload • Signature)
- Digital Signatures
- HMAC & SHA-256
- HS256 vs RS256
- Base64URL Encoding
- JWT Security Best Practices
- Python Security Tool Development
- HTML Report Generation
- Python Package Publishing (PyPI)
🌍 Real-World Application
JWT security is an important part of modern web application security. During security assessments, penetration testers and application security engineers review JWT implementations to identify weaknesses such as insecure algorithms, weak signing secrets, missing expiration, and improper token validation.
This tool helps automate those checks for learning and testing purposes.
📂 Project Structure
JWT-Security-Scanner/
│
├── jwt_scanner/
│ ├── __init__.py
│ └── scanner.py
├── setup.py
├── pyproject.toml
├── requirements.txt
├── README.md
└── .gitignore
🚀 Running from Source
Clone the repository:
git clone https://github.com/tabassumfathima28/JWT-Security-Scanner.git
cd JWT-Security-Scanner
Install dependencies:
pip install -r requirements.txt
Run:
py jwt_scanner\scanner.py
🔗 Related Project
🛡 AI-Powered SIEM Home Lab
A complete SIEM lab built using Elastic SIEM and Tines automation.
https://github.com/tabassumfathima28/SIEM-HOME-LAB-PROJECT
👩💻 Author
Tabassum Fathima
Cybersecurity Undergraduate | Aspiring SOC Analyst
- GitHub: https://github.com/tabassumfathima28
- LinkedIn: https://www.linkedin.com/in/tabassumfathima2812/
⭐ Support
If you found this project useful, consider giving it a ⭐ on GitHub!
"Security is not a product, but a process." — Bruce Schneier
Metadata
Release files for jwt-security-scanner 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| jwt_security_scanner-1.0.1.tar.gz | 12.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jwt_security_scanner-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.0 kB
Release files / jwt_security_scanner-1.0.1.tar.gz
| Download URL | jwt_security_scanner-1.0.1.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bd3ce9a4537081fd3268c5f68e9eb21deeee0ee2e20e1c5baa69155b9b10ef8
|
|
BLAKE2b-256 checksum How to use checksums |
dc6e6035e4304a2991cb30c4f850fd15cb0ed0d5a5a0174e0eff9cad333d943f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / jwt_security_scanner-1.0.1-py3-none-any.whl
| Download URL | jwt_security_scanner-1.0.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9cde214de7741fef4fbcae9ac9fa939abfb07af8b081677954d591b4ea754906
|
|
BLAKE2b-256 checksum How to use checksums |
a1cd911a90edbd8ee39557481338d4dfba84e9c7b3aae92cdc68956630a5c9d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for jwt-security-scanner 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.