Skip to content
Access control Write-up Beginner

Wordpress Misconfiguration Lead to User Files Disclosure ($$$)

The WordPress REST API media endpoint returned a list of all uploaded files to any authenticated user, including those who had just registered through public registration. An attacker could register, upload a test file, then use the session to list and download other users' files without authorisation.

medium.com

Published on medium.com

Hello again in bug hunt story. I’m part time bug hunter, so in my spare time I take a look in some program in but bounty program.

Rizaldi Wahaz, 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 media REST endpoint lacked a per-user ownership check, so any authenticated account could list all uploaded media rather than only its own.

Impact

An attacker could download confidential files uploaded by other users, leading to data leaks and privacy breaches.

What the attacker needed

Public user registration enabled; a free account; public file upload form

The fix

The endpoint should require proper authentication and authorisation, use role-based access control so users see only their own files, and avoid exposing unnecessary metadata.

How it was found

  1. Find the media REST API endpoint, which initially denies unauthenticated access.
  2. Upload a test file through the public contact form.
  3. Register a new account on the public registration page.
  4. Use the registration session cookie to request the media endpoint.
  5. Observe the response lists uploaded files with direct download URLs.
  6. Confirm those direct links work without authentication.

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 has a built-in web interface (REST API) that lets programs talk to the site. The media part of that interface was supposed to show only your own uploads, but it showed everyone's. Because anyone could create an account, a stranger could sign up and then browse and download files that other people had uploaded privately.

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.