# Aikido Deep Review caught an XSS in WordPress only 10 minutes after it was committed

WordPress dev commit re-enabled TinyMCE elementpath, letting an author's data-wp-more attribute reach innerHTML and run stored XSS in an Administrator's browser.

- Payout: Research
- Severity: high
- Program: WordPress
- Write-up by: Aikido Security
- Disclosed: 2026-12-01
- Write-up quality: 7/10
- Original: https://www.aikido.dev/blog/wordpress-stored-xss-deep-review
- Library page: https://bugbountylibrary.com/r/blog%3Aaikido-dev-blog-wordpress-stored-xss-deep-review
- Tags: area:web domain:web impact:ato kind:research platform:threat-intel sev:high tech:php tech:wordpress technique:chained technique:source-review vuln:xss

**Target:** WordPress Classic editor / TinyMCE element path status bar
**Root cause:** Removing `$settings['elementpath'] = false;` re-enabled TinyMCE's element path rendering, where WordPress's ResolveName substitutes the image's author-controlled `data-wp-more` attribute for the `img` label and TinyMCE inserts it via innerHTML.
**Steps:**
1. Note commit 7fdd5eb removes `$settings['elementpath'] = false;` in class-wp-editor.php, re-enabling the TinyMCE element path bar.
2. Trace ResolveName in WordPress code: it replaces the `img` label with the image's `data-wp-more` attribute value.
3. Trace TinyMCE inserting that label with innerHTML.
4. As an author, create a post containing `<p><img src="/wp-includes/images/w-logo-blue-white-bg.png" width="100" data-wp-more="&lt;img src=x onerror=alert(document.domain)&gt;"></p>`.
5. Administrator edits the post in Classic editor and clicks the image; the attribute is placed in the DOM via innerHTML and the payload executes.
**How found:** Aikido's research agent monitored WordPress commits and flagged the one-line diff within 10 minutes; Deep Review followed the setting into class-wp-editor.php, ResolveName, and TinyMCE's innerHTML call to expose the full author-attribute-to-admin-HTML path. The first PoC failed because WordPress filters post content before TinyMCE, so additional agents searched for a bypass through the filter.
**Exploitation:** Author-level user plants a crafted image tag in post content; when an Administrator opens the post in the Classic editor and selects the image, the element path bar renders the data-wp-more value as HTML, executing JavaScript in the admin's session.
**Insight:** A one-line removal of a hardening flag (elementpath=false) can re-expose a latent sink in a dependency; when a PoC is blocked by a content filter, look for attribute-level bypasses (encoded entities in data-* attributes) rather than tag-level ones.

## Proof of concept (copied exactly from the original report)

**Malicious image post payload for stored XSS**

```
<p><img src="/wp-includes/images/w-logo-blue-white-bg.png" width="100" data-wp-more="&lt;img src=x onerror=alert(document.domain)&gt;"></p>
```

