Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-1529 — Keycloak: Unauthorized organization registration via improper invitation token validation | Kitploit
Tools/GitHubGitHub/0x240x23elu/cve-2026-1529
Authentication & AuthorizationPayload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration Testing
GitHub0x240x23elu/cve-2026-1529

CVE-2026-1529

Keycloak: Unauthorized organization registration via improper invitation token validation

View Repository
326 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-1529 Keycloak Exploit Tool

Python Version License Status

CVE-2026-1529: Keycloak - Unauthorized organization registration via improper invitation token validation

⚠️ WARNING: This tool is for educational and authorized security testing purposes only. Unauthorized access to computer systems is illegal.

📋 Table of Contents

  • Overview
  • Features
  • Prerequisites
  • Installation
  • Usage
  • Configuration
  • How It Works
  • Output
  • Troubleshooting
  • Legal Disclaimer
  • Contributing
  • Credits

🎯 Overview

This tool demonstrates a critical vulnerability in Keycloak (CVE-2026-1529) that allows unauthorized organization registration through improper JWT invitation token validation. The exploit manipulates invitation tokens to gain unauthorized access to Keycloak instances.

Vulnerability Details:

  • CVE ID: CVE-2026-1529
  • Severity: Critical
  • Attack Vector: Network
  • Attack Complexity: Low
  • Affected: Keycloak instances with organization invitation feature

✨ Features

  • ✅ Automatic vulnerability detection
  • ✅ JWT token manipulation
  • ✅ Automated user registration
  • ✅ Login verification
  • ✅ Detailed exploit reports
  • ✅ Configurable parameters
  • ✅ Debug logging support
  • ✅ Multi-retry HTTP client

📦 Prerequisites

  • Python 3.7 or higher
  • pip (Python package manager)
  • Virtual environment (recommended)
  • Target Keycloak instance (authorized testing only)

🚀 Installation

Method 1: Clone Repository

root@kitploit:~
# Clone the repository
git clone https://github.com/yourusername/cve-2026-1529-exploit.git
cd cve-2026-1529-exploit

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Method 2: Manual Setup

root@kitploit:~
# Create directory structure
mkdir -p keycloak-exploit/{utils,config,logs,output/reports}
cd keycloak-exploit

# Download files from releases or copy manually
# Then install dependencies
pip install requests urllib3 PyJWT

File Structure

root@kitploit:~
keycloak-exploit/
├── keycloak-exploit.py           # Main exploit script
├── requirements.txt              # Python dependencies
├── README.md                     # This file
├── config/
│   └── default_config.json       # Configuration file
├── utils/
│   ├── __init__.py              # Package initializer
│   ├── http_utils.py            # HTTP client utilities
│   ├── jwt_utils.py             # JWT manipulation
│   └── crypto_utils.py          # Crypto utilities
├── logs/                         # Auto-generated logs
└── output/
    └── reports/                  # Exploit reports

💻 Usage

Basic Usage

root@kitploit:~
python3 keycloak-exploit.py https://target-keycloak.com

Advanced Options

root@kitploit:~
# With custom invitation token
python3 keycloak-exploit.py -t eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... https://target.com

# With custom organization ID
python3 keycloak-exploit.py -o custom_org_id https://target.com

# With custom configuration file
python3 keycloak-exploit.py -c /path/to/config.json https://target.com

# Enable debug logging
python3 keycloak-exploit.py -d https://target.com

# Show help
python3 keycloak-exploit.py -h

# Show version
python3 keycloak-exploit.py -v

Command Line Arguments

⚙️ Configuration

Edit config/default_config.json to customize exploit parameters:

root@kitploit:~
{
    "exploit": {
        "default_username": "admin_user_2026",
        "default_password": "KeycloakCVE2026!",
        "default_email": "[email protected]",
        "timeout": 30,
        "max_retries": 3
    },
    "jwt": {
        "algorithm": "HS256",
        "secret_key": "keycloak-cve-2026-1529-exploit",
        "token_expiry": 3600
    },
    "target": {
        "endpoints": {
            "realms": "/realms",
            "organizations": "/organizations",
            "register": "/register",
            "login": "/login"
        }
    },
    "output": {
        "log_level": "INFO",
        "save_reports": true,
        "report_format": "txt"
    }
}

Configuration Options

🔧 How It Works

The exploit works in the following steps:

  1. Vulnerability Check

    • Connects to target Keycloak instance
    • Detects Keycloak version
    • Tests organization endpoints
  2. Token Generation/Manipulation

    • Generates or accepts invitation token
    • Decodes JWT token
    • Manipulates organization ID in payload
    • Re-signs token with known key
  3. User Registration

    • Submits registration with manipulated token
    • Bypasses organization validation
    • Creates unauthorized user account
  4. Login Verification

    • Tests login with created credentials
    • Generates access token
    • Provides login URL
  5. Report Generation

    • Creates detailed exploit report
    • Saves to output/reports/
    • Includes all technical details

Attack Flow Diagram

root@kitploit:~
┌─────────────────┐
│  Target Check   │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  Token Gen/Get  │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Token Manipulate│
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ User Register   │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  Login Test     │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  Report Gen     │
└─────────────────┘

📊 Output

Successful Exploit Output

root@kitploit:~
============================================================
CVE-2026-1529 EXPLOIT RESULTS
============================================================
✓ Target is vulnerable to CVE-2026-1529

🎯 EXPLOIT SUCCESSFUL!
Username: admin_user_2026
Password: KeycloakCVE2026!
Email: [email protected]
Login Link: https://target.com/realms/master/account

📄 Report saved to: output/reports/exploit_report_20260211_050507.txt

🔐 Use the provided credentials to access the Keycloak instance!
⚠️  This demonstrates unauthorized access due to CVE-2026-1529

============================================================
by f3ds cr3w est, 2002
============================================================

Generated Report

A detailed report is saved to output/reports/ containing:

  • Target information
  • Exploit results for each step
  • Created user credentials
  • Login link
  • Original and manipulated tokens
  • Technical details
  • CVE information
  • Security advisory

Log Files

Logs are saved to logs/ directory with detailed execution information.

🐛 Troubleshooting

Common Issues

1. ModuleNotFoundError: No module named 'utils'

Solution:

root@kitploit:~
# Make sure you're in the correct directory
cd keycloak-exploit
python3 keycloak-exploit.py https://target.com

2. Configuration file not found

Solution:

root@kitploit:~
# Ensure config directory exists
mkdir -p config
# Copy or create default_config.json in config/

3. Retry.init() got an unexpected keyword argument 'method_whitelist'

Solution: This has been fixed in the latest version. Update urllib3:

root@kitploit:~
pip install --upgrade urllib3

4. Target is not vulnerable

Possible reasons:

  • Target is not a Keycloak instance
  • Keycloak is not accessible
  • Organization feature is disabled
  • Target is patched against CVE-2026-1529

Solution:

root@kitploit:~
# Enable debug logging to see more details
python3 keycloak-exploit.py -d https://target.com

5. Connection timeout

Solution:

root@kitploit:~
# Increase timeout in config/default_config.json
"timeout": 60

Debug Mode

Enable verbose logging to troubleshoot issues:

root@kitploit:~
python3 keycloak-exploit.py -d https://target.com

This will show:

  • Detailed HTTP requests/responses
  • Token manipulation steps
  • Registration attempts
  • Full error stack traces

📜 Legal Disclaimer

root@kitploit:~
⚠️ IMPORTANT LEGAL NOTICE ⚠️

This tool is provided for EDUCATIONAL and AUTHORIZED SECURITY TESTING purposes only.

By using this tool, you agree that:

1. You will only use this tool on systems you own or have explicit written 
   permission to test.

2. You understand that unauthorized access to computer systems is illegal 
   under laws including but not limited to:
   - Computer Fraud and Abuse Act (CFAA) - United States
   - Computer Misuse Act - United Kingdom
   - Similar legislation in other countries

3. You accept full responsibility for any consequences of using this tool.

4. The authors and contributors are not responsible for any misuse or damage 
   caused by this tool.

5. This tool is provided "AS IS" without warranty of any kind.

USE AT YOUR OWN RISK. UNAUTHORIZED ACCESS IS A CRIME.

🤝 Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/improvement)
  5. Create a Pull Request

Development Setup

root@kitploit:~
# Clone your fork
git clone https://github.com/yourusername/cve-2026-1529-exploit.git
cd cve-2026-1529-exploit

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Make your changes and test
python3 keycloak-exploit.py https://test-target.com

Code Style

  • Follow PEP 8 guidelines
  • Add docstrings to functions
  • Include type hints where possible
  • Write descriptive commit messages

🏆 Credits

Created by: f3ds cr3w est, 2002

Dependencies

  • requests - HTTP library
  • urllib3 - HTTP client
  • PyJWT - JWT implementation

📝 Version History

v1.0.0 (2026-02-11)

  • Initial release
  • CVE-2026-1529 exploit implementation
  • JWT token manipulation
  • Automated user registration
  • Report generation
  • Debug logging support

🔗 Resources

  • CVE-2026-1529 Details
  • Keycloak Documentation
  • JWT Best Practices
  • OWASP Testing Guide

📧 Contact

For questions, issues, or security concerns:

  • Open an issue on GitHub
  • Contact: [[email protected]]
  • Security issues: Report privately

Remember: Always practice responsible disclosure and ethical hacking. Ref: https://github.com/ninjazan420/CVE-2026-1529-PoC-keycloak-unauthorized-registration-via-improper-invitation-token-validation Made with ❤️ by f3ds cr3w est, 2002

Download Tool
ArgumentShortDescription
target-Target Keycloak URL (required)
--token-tCustom invitation token
--org-id-oCustom organization ID
--config-cPath to configuration file
--debug-dEnable debug logging
--version-vShow version information
--help-hShow help message
SectionParameterDescriptionDefault
exploitdefault_usernameUsername for registrationadmin_user_2026
exploitdefault_passwordPassword for registrationKeycloakCVE2026!
exploitdefault_emailEmail for registration[email protected]
exploittimeoutHTTP request timeout (seconds)30
exploitmax_retriesMax HTTP retries3
jwtalgorithmJWT signing algorithmHS256
jwtsecret_keyJWT secret keyCustom
jwttoken_expiryToken expiry (seconds)3600