CVE-2023–0759 / Privilege Escalation in the Cockpit CMS
A user with a low-privilege role could change their own role to admin by manipulating the profile update request. This granted them full administrator privileges in Cockpit CMS.
During my pentest, I discovered a vulnerability affecting versions 2.3.6and 2.3.7of the system, which has since been fixedin version 2.3.8.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the profile update endpoint accepted a role parameter from the client without checking that the user was allowed to change roles.
Impact
An authenticated low-privilege user could gain full administrator access to the CMS.
What the attacker needed
A low-privilege account; ability to intercept HTTP requests
The fix
The vulnerability was fixed in version 2.3.8.
How it was found
- Log in as a user assigned to a role with no privileges.
- Intercept the profile update request.
- Change the role value from user to admin and send the request.
- Observe a 200 status code and administrative functions become available.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
In many web apps, your account has a 'role' that decides what you can do. Here, the app let a normal user edit their own profile and quietly accept a new role value sent in the request, so the user could make themselves an administrator. This is like a hotel guest being able to rewrite their room key to open every door.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.