Skip to content
CORS Write-up Beginner

Administrator Account Takeover

The WordPress REST API endpoint for users exposed administrator email addresses without authentication, and a CORS policy with credentials allowed any origin to read the response. An attacker could use a malicious page to steal the admin's email and then trigger a password reset to that address.

hrofficial62 Follow

Published on medium.com

In this article we learn how wordpress website leaks admin PII for account takeover

Mr Horbio, 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 WordPress REST API users endpoint was left publicly accessible and the site's CORS policy allowed any origin with credentials, so cross-origin scripts could read the exposed data.

Impact

An attacker could steal an administrator's email address and use it to trigger a password reset, potentially leading to account takeover.

What the attacker needed

Victim visits attacker's page; WordPress REST API users endpoint public; CORS allows credentials from any origin

How it was found

  1. Visit the WordPress REST API users endpoint for a specific user ID.
  2. Intercept the request and observe the unauthenticated response containing the administrator's email address.
  3. Create an HTML file with a script that makes a cross-origin request to that endpoint with credentials and sends the response to an attacker-controlled server.
  4. Open the HTML file in a browser to trigger the request and exfiltrate the data.
  5. Use the stolen email address on the WordPress lost password page to confirm it is a valid account and trigger a reset email.

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.

A website's programming interface (API) was giving out the email address of the site's main administrator to anyone who asked, without needing to log in. The site also had a setting that let other websites read that data, so a attacker could trick an admin into visiting a page that quietly grabbed the email. With the email, the attacker could then ask the site to send a password reset link to that address.

What is CORS?

A permissive cross-origin policy lets another site read responses with the user's credentials.

More by hrofficial62

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

CORS misconfiguration

The lesson behind this report.

A permissive cross-origin policy lets another site read responses with the user's credentials.