Skip to content
Access control Write-up Intermediate

A Learning Journey: Attempting to Turn a WordPress Theme CVE into a PoC

An outdated WordPress theme had a missing capability check on an AJAX action, allowing unauthenticated attackers to modify the site's footer text. The author built a local proof of concept but could not reproduce the issue on the live target, likely due to a false positive in version detection.

motoko_ayanami Follow

Published on medium.com

One evening, while participating in a public bug bounty program, I encountered an outdated WordPress website within scope. I decided to run a scan using WPScan (https://github.com/wpscanteam/wpscan) on the target and identified several potential vulnerabilities.

Motoko Ayanami, 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

The theme's AJAX handler for saving footer text did not check whether the user had permission to perform that action.

Impact

An unauthenticated attacker could permanently change the website's footer text, which could damage credibility and endanger visitors, though the author could not reproduce it on the live site.

What the attacker needed

WordPress site with vulnerable theme version; No authentication required

The fix

The vulnerability was fixed in version 5.0.3 by adding a capability check to the AJAX handler.

How it was found

  1. Set up a local WordPress instance with the vulnerable theme version.
  2. Download the vulnerable theme version from the WordPress theme repository.
  3. Review the code changes between the vulnerable and patched versions.
  4. Identify the AJAX action that saves footer text.
  5. Send a POST request to the admin-ajax endpoint with the action and new footer text.
  6. Observe that the footer text is updated 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.

A WordPress theme allowed anyone to change the text at the bottom of a website without logging in. The author tested this on their own copy but could not make it work on the real site, possibly because the site was not actually using the vulnerable version.

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.