Skip to content
Access control Write-up Intermediate

Critical Authentication Flaw — Grants Full WordPress Admin Acce

A JWT token issued to a newly signed-up ordinary user carried full administrator privileges, so the account could reach WordPress REST API endpoints reserved for admins. An attacker could enumerate and export users' personal data and delete any account.

Ahmed Mahmoued Follow

Published on medium.com

Today I will share my latest finding from a Bug Bounty Program (BBP). It’s a critical vulnerability that allows any attacker to gain full WordPress Admin access through the REST API and completely control the site.

Ahmed Mahmoued, on 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

Likely the signup flow issued a JWT with an administrator role or privilege claim, and the REST API trusted that claim without checking the user's real role.

Impact

An attacker with only a free signup could read and export all users' personal data and delete any account, giving full control over the site.

What the attacker needed

Ability to sign up; no special role needed

How it was found

  1. Find the signup function and create a normal user account.
  2. Receive a JWT token after the account is created.
  3. Visit the WordPress REST API index to see the available endpoints.
  4. Send the signup JWT token to the REST API and observe that it is accepted.
  5. Use the token to reach administrator-only endpoints and user data.

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.

When you sign up on a website, the site gives your browser a token, a short piece of text that proves who you are on later requests. Here the token handed to a brand-new ordinary account was treated by the server as if it belonged to the site's administrator, so the new account could do admin-only things like read everyone's personal details or delete accounts.

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.