Skip to content
Access control Write-up Beginner

How an unauthenticated attacker can create a WordPress admin acco

The Ultimate Member WordPress plugin before 2.6.7 allowed visitors to supply the wp_capabilities parameter during registration, so a new account could be created with administrator privileges. An unauthenticated attacker could therefore create an admin account and take over the site.

Dardan Hasani Follow

Published on cyberdardan.medium.com

While doing some research about CVEs, i stumbled upon CVE-2023–3460 which seems very interesting. With a very high rating in the CVSS score (9.8), i thought it would be a very interesting study case.

Dardan Hasani, on cyberdardan.medium.com

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

The plugin did not sanitise or block the wp_capabilities parameter during registration, allowing a visitor to set their own role.

Impact

An unauthenticated attacker could create an administrator account, leading to immediate takeover of the site and the ability to install backdoors.

What the attacker needed

Vulnerable Ultimate Member plugin installed; registration page enabled; no account needed

The fix

The plugin was fixed in version 2.6.7 by preventing visitors from setting arbitrary capabilities during registration.

How it was found

  1. Install the vulnerable version of the Ultimate Member plugin on a WordPress site.
  2. Visit the registration page.
  3. Submit the registration form with an added wp_capabilities parameter requesting administrator.
  4. Follow the redirect and check the admin panel to see the new administrator account.

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.

WordPress uses a hidden field called wp_capabilities to decide what a user is allowed to do, such as being an administrator. The plugin failed to block visitors from adding that field to the registration form, so anyone could sign up and ask to be made an admin. The result is that a stranger can gain full control of the website.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.