Skip to content
Access control Disclosed report Intermediate

Information Disclosure - Unauthen Leak Private Content

bbPress's BuddyPress integration decided whether new topic and reply activity should be hidden by checking only the posting forum's own status, not its parent forums. A public subforum nested under a private parent therefore had its topics broadcast in full to the public BuddyPress activity stream, even though the topic permalink returned 404 to the same viewer.

thewindghost Follow with memoriesabouther

Originally disclosed on HackerOne

  • Triaged in 28 hours
  • Fixed in 41 hours
  • Paid in 8 days
  • Disclosed after 17 days

Affected Version + Version Used:

Component Version
WordPress 7.1.2
BuddyPress 14.5.2
bbPress 2.6.18 (the exact zip reviewed: https://downloads.wordpress.org/plugin/bbpress.2.6.18.zip)
PHP 8.4.24 (cli)
MariaDB 11.8.8-MariaDB-1 (Debian)

Description:

bbPress's BuddyPress integration computes the hide_sitewide flag for new topic/reply activity by checking only the posting forum's own status, not its ancestors. A publish-status subforum nested under a private/hidden parent forum therefore has its topics broadcast in full (title, forum name, permalink, raw body) to BuddyPress's public Activity stream, even though the topic's own permalink correctly 404s for the same viewer.

Steps To Reproduce:

  1. Member posts topic in subforum (forum_id=6, child of private forum)

curl -s -b cookies.txt -L -d "bbp_topic_title=Test&bbp_topic_content=Secret&bbp_forum_id=6&action=bbp-new-topic&_wpnonce=$N"
https://site/forums/forum/private/public-subforum/ -> HTTP 200, redirect to /forums/topic/test/

  1. Direct permalink correctly blocked

curl -s -o /dev/null -w "%{http_code}" https://site/forums/topic/test/ -> 404

  1. Anonymous read via public activity stream

curl -s https://site/wp-json/buddypress/v1/activity | grep -o '"rendered":"[^"]Secret[^"]"' -> "rendered":"<p>Secret</p>" (full content disclosed)

Recommendations

Code Fix: In includes/extend/buddypress/activity.php (inside topic_create and reply_create), remove the false argument so bbp_is_forum_public() correctly checks parent ancestors:

// Change from: ! bbp_is_forum_public( $forum_id, false )
'hide_sitewide' => ! bbp_is_forum_public( $forum_id ),

Impact

Data Leakage: Full post content, titles, and details of topics inside private or hidden subforums are broadcast to the public activity stream.

Access Control Bypass: Unauthenticated users or low-privileged accounts can read restricted content via the BuddyPress feed/API, even though direct links return a 404.

The original report as published on HackerOne, by thewindghost. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

bbPress is the forum plugin for WordPress, and it ships an integration layer for BuddyPress, the social networking plugin. When a member creates a topic or posts a reply, that integration records an entry in the BuddyPress Activity stream so that forum activity appears in the site's social feed. Each activity entry carries a hide_sitewide flag, which decides whether the entry is visible to everyone or restricted.

The report examines how that flag is computed for new topic and reply activity. The expectation is straightforward: if a topic lives somewhere that is not public, its activity entry should not be broadcast. The report shows that the check only looks at the forum the topic is posted in, not at the forums above it in the hierarchy, so a public subforum nested under a private parent leaks its content into the public stream.

Setup

The researcher lists the exact components and versions used for the review:

Component Version
WordPress 7.1.2
BuddyPress 14.5.2
bbPress 2.6.18 (the exact zip reviewed: https://downloads.wordpress.org/plugin/bbpress.2.6.18.zip)
PHP 8.4.24 (cli)
MariaDB 11.8.8-MariaDB-1 (Debian)

The precondition is a forum hierarchy in which a subforum with publish status sits underneath a private or hidden parent forum. The reproduction uses a member account, a session cookie file (cookies.txt) and a nonce value held in the shell variable $N. The target host is referred to as site throughout.

Finding it

The researcher looked at how the BuddyPress integration in bbPress computes hide_sitewide for new topic and reply activity. The code path checks the status of the posting forum only. It does not walk up the hierarchy to the forum's ancestors.

That matters because bbPress forums can be nested, and a child forum can be public while its parent is private or hidden. In that arrangement the topic's own permalink is protected: a viewer without access gets a 404. But the activity entry created for the topic is evaluated against the child forum alone, so it is treated as public and written to the sitewide Activity stream with the topic's title, forum name, permalink and raw body.

The mismatch is the signal: the same content is blocked at one URL and served in full at another.

Exploitation

Step 1: post a topic in the public subforum under a private parent

A member posts a topic in forum_id=6, a child of a private forum, using the normal new-topic form endpoint:

Bash
curl -s -b cookies.txt -L -d "bbp_topic_title=Test&bbp_topic_content=Secret&bbp_forum_id=6&action=bbp-new-topic&_wpnonce=$N" \
  https://site/forums/forum/private/public-subforum/

The POST carries the topic title (Test), the body (Secret), the target forum id (6), the form action bbp-new-topic and the WordPress nonce. The session cookie is supplied from cookies.txt, and -L follows redirects. The response is HTTP 200 after a redirect to /forums/topic/test/, so the topic was created successfully.

Step 2: confirm the permalink is protected

The researcher then requests the topic's own permalink without following the body, printing only the status code:

Bash
curl -s -o /dev/null -w "%{http_code}" https://site/forums/topic/test/

The result is 404. Access control on the topic page itself behaves as expected: the content is not reachable at its canonical URL.

Step 3: read the same content anonymously from the activity stream

The BuddyPress REST endpoint is queried with no authentication at all, and the output is filtered for the secret string:

Bash
curl -s https://site/wp-json/buddypress/v1/activity | grep -o '"rendered":"[^"]*Secret[^"]*"'

The response contains:

Text
"rendered":"<p>Secret</p>"

That is the full topic body, disclosed to an unauthenticated caller through the public activity feed, while the direct permalink returned 404 to the same kind of viewer.

Root cause

The bug is in includes/extend/buddypress/activity.php, in the topic_create and reply_create handlers. The hide_sitewide value is derived from bbp_is_forum_public() with a second argument of false:

Text
// Change from: ! bbp_is_forum_public( $forum_id, false )
'hide_sitewide' => ! bbp_is_forum_public( $forum_id ),

Passing false suppresses the ancestor check, so the function evaluates only the posting forum's own status. A publish-status subforum under a private or hidden parent therefore passes as public, and the activity entry is not hidden sitewide. The permalink check that returns 404 uses a different path that does respect the hierarchy, which is why the two views disagree.

Impact

The report describes two consequences:

  1. Data leakage. Full post content, titles and details of topics inside private or hidden subforums are broadcast to the public activity stream.
  2. Access control bypass. Unauthenticated users or low-privileged accounts can read restricted content through the BuddyPress feed or API, even though direct links return a 404.

The exposure depends on the forum layout: it requires a public subforum nested beneath a private or hidden parent, and .

Fix

The report recommends a code change in includes/extend/buddypress/activity.php, inside topic_create and reply_create: remove the false argument so that bbp_is_forum_public() checks parent ancestors as well.

Text
// Change from: ! bbp_is_forum_public( $forum_id, false )
'hide_sitewide' => ! bbp_is_forum_public( $forum_id ),

With the ancestor check enabled, a topic in a public subforum under a private parent is no longer treated as public, and its activity entry is hidden sitewide.

Variants to test

  • Reply activity. The same handler pair covers replies, so post a reply in a public subforum under a private parent and check whether the reply body appears in the activity stream. A positive result is the reply text returned by the activity endpoint while the reply permalink 404s.
  • Deeper nesting. Try a public subforum several levels below a private ancestor. A positive result is the same disclosure, showing the check fails at any depth rather than only one level up.
  • Hidden versus private parents. Repeat with a hidden parent forum rather than a private one. A positive result is content from the child appearing in the public stream.
  • Other activity consumers. Query the activity feed through other routes the site exposes, not only the REST endpoint, and look for the same rendered body. A positive result is the secret string appearing in any unauthenticated view.
  • Status changes after posting. Change a parent forum from public to private after topics exist and observe whether previously created activity entries remain visible. A positive result is old entries still served to anonymous callers.

Hunting notes

This class of bug hides where a plugin integrates with a second plugin and re-implements an access decision instead of reusing the one that already works. The tell is a permission helper called with an argument that narrows its scope, especially a boolean that disables a hierarchy or ancestor check. When you review such code, compare the check used for the canonical object URL with the check used for every derived copy: feeds, activity streams, search indexes, sitemaps, notifications and REST endpoints.

During recon, look for sites running bbPress together with BuddyPress and map the forum hierarchy. A public child under a private or hidden parent is the configuration to look for. The confirmation pattern is simple and strong: the permalink returns 404 while an unauthenticated request to the activity endpoint returns the body. Demonstrating both in the same report, as done here, shows the access control is inconsistent rather than absent, which is what makes the impact clear.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A WordPress site can run two plugins that work together: bbPress, which adds forums, and BuddyPress, which adds a social feed (a stream of activity, a bit like a timeline on a social network). When someone starts a forum topic or writes a reply, bbPress tells BuddyPress about it, and BuddyPress puts an entry in that public feed.

Each feed entry has a switch called hide_sitewide. Think of it as a "show this to everyone" versus "keep this restricted" setting. The report found that bbPress sets this switch by looking only at the forum where the post was made, and not at the forums above it. Forums can be nested, like folders inside folders: a small public forum can sit inside a bigger private one. In that setup, a topic's own page is correctly blocked (a visitor gets a "not found" error), but the feed entry for the same topic is treated as public and shows the full text to anyone, even someone who is not logged in.

So the same content is locked at one door and wide open at another. That is the whole bug in one sentence.

The setup

The researcher lists the exact software and versions used, so that anyone can rebuild the same environment:

Component Version
WordPress 7.1.2
BuddyPress 14.5.2
bbPress 2.6.18 (the exact zip reviewed: https://downloads.wordpress.org/plugin/bbpress.2.6.18.zip)
PHP 8.4.24 (cli)
MariaDB 11.8.8-MariaDB-1 (Debian)

A few words on those names. WordPress is the software that runs the website. PHP is the programming language WordPress is written in, and "cli" means it is run from a command line rather than through a web page. MariaDB is the database, the place where the site stores its posts, users and settings. bbPress and BuddyPress are plugins: extra pieces of software you install into WordPress to add features.

The test needs one specific arrangement of forums: a subforum that is set to public, sitting underneath a parent forum that is set to private or hidden. The researcher uses a normal member account, a file called cookies.txt that holds the login session, and a value stored in a shell variable called $N. The site's address is written as site throughout.

Two of those need explaining. A cookie is a small piece of data your browser stores and sends back to a website on every request; it is how a site remembers that you are logged in. Saving cookies to a file lets a command-line tool act as a logged-in user. A nonce is a one-time code a website puts into a form to prove the form really came from that site and was not forged by another page; $N is just a variable holding that code.

Finding it

The researcher read the part of bbPress that talks to BuddyPress and works out the hide_sitewide value for new topics and replies. That code checks the status of the forum the post was made in, and stops there. It never walks up to the parent forums.

Why does that matter? Because bbPress forums can be nested. A child forum can be public while its parent is private or hidden. In that case the topic's own web address (its permalink, the permanent link to that page) is protected: a visitor without permission gets a 404, which is the standard "page not found" response. But the feed entry created for the topic is judged against the child forum alone, so it is marked as public and written into the sitewide activity stream together with the topic's title, forum name, permalink and raw body.

The giveaway is that mismatch: identical content, blocked at one address and served in full at another.

Exploitation

Step 1: post a topic in the public subforum under a private parent

A logged-in member creates a topic in forum_id=6, a child of a private forum, using the site's normal new-topic form:

Bash
curl -s -b cookies.txt -L -d "bbp_topic_title=Test&bbp_topic_content=Secret&bbp_forum_id=6&action=bbp-new-topic&_wpnonce=$N" \
  https://site/forums/forum/private/public-subforum/

Line by line:

  • curl is a command-line tool for sending web requests, the same kind your browser sends but without the window.
  • -s means silent: hide the progress meter so the output is clean.
  • -b cookies.txt attaches the saved cookies, so the site sees the request as coming from the logged-in member.
  • -L means follow redirects. After a form is submitted, sites usually send you to a new page; this tells curl to go there too.
  • -d "..." is the form data being submitted, the same fields a browser would send when you fill in the new-topic form. It contains the topic title (Test), the body (Secret), the target forum id (6), the form action bbp-new-topic, and the WordPress nonce.
  • The URL on the second line is the address of the subforum where the topic is being posted.

The result is HTTP 200 after a redirect to /forums/topic/test/. HTTP 200 is the standard "OK" response code, so the topic was created successfully.

Step 2: confirm the permalink is protected

Next the researcher requests the topic's own page, throwing away the page body and printing only the status code:

Bash
curl -s -o /dev/null -w "%{http_code}" https://site/forums/topic/test/
  • -o /dev/null sends the page content to a black hole, because only the status code matters here.
  • -w "%{http_code}" prints just the numeric status code.

The answer is 404. The access control on the topic page itself works as it should: the content cannot be reached at its normal address.

Step 3: read the same content anonymously from the activity stream

Now the BuddyPress feed is queried with no login at all, and the output is filtered for the secret word:

Bash
curl -s https://site/wp-json/buddypress/v1/activity | grep -o '"rendered":"[^"]*Secret[^"]*"'
  • The URL is an API endpoint. An API is a way for software to talk to a website and get data back in a structured form, rather than as a web page for humans. Here it returns the site's activity feed as data.
  • The | symbol pipes the output of curl into the next command.
  • grep -o searches that output and prints only the matching part. The pattern looks for the word Secret surrounded by the JSON field "rendered", which is where the feed stores the formatted post body. JSON is a common text format for structured data, made of names and values in quotes.

The response contains:

Text
"rendered":"<p>Secret</p>"

That is the full topic body, handed to a caller who never logged in, through the public activity feed, while the direct permalink returned 404 to the same kind of visitor.

Root cause

The bug lives in includes/extend/buddypress/activity.php, in the two handlers named topic_create and reply_create. The hide_sitewide value comes from a function called bbp_is_forum_public(), and it is called with a second argument of false:

Text
// Change from: ! bbp_is_forum_public( $forum_id, false )
'hide_sitewide' => ! bbp_is_forum_public( $forum_id ),

Passing false switches off the check of parent forums, so the function looks only at the posting forum's own status. A public subforum under a private or hidden parent therefore passes as public, and the feed entry is not hidden sitewide. The check behind the 404 on the permalink is a different code path that does respect the hierarchy, which is why the two views disagree.

Impact

The report describes two consequences:

  1. Data leakage. Full post content, titles and details of topics inside private or hidden subforums are broadcast to the public activity stream.
  2. Access control bypass. Unauthenticated users or low-privileged accounts can read restricted content through the BuddyPress feed or API, even though direct links return a 404.

The exposure depends on the forum layout: it needs a public subforum nested beneath a private or hidden parent, and .

Fix

The report recommends a code change in includes/extend/buddypress/activity.php, inside topic_create and reply_create: remove the false argument so that bbp_is_forum_public() checks parent forums as well.

Text
// Change from: ! bbp_is_forum_public( $forum_id, false )
'hide_sitewide' => ! bbp_is_forum_public( $forum_id ),

With the parent check switched back on, a topic in a public subforum under a private parent is no longer treated as public, and its feed entry is hidden sitewide.

Variants to test

  • Reply activity. The same pair of handlers covers replies, so post a reply in a public subforum under a private parent and check whether the reply body appears in the activity stream. A positive result is the reply text returned by the activity endpoint while the reply permalink 404s.
  • Deeper nesting. Try a public subforum several levels below a private ancestor. A positive result is the same disclosure, showing the check fails at any depth rather than only one level up.
  • Hidden versus private parents. Repeat with a hidden parent forum rather than a private one. A positive result is content from the child appearing in the public stream.
  • Other activity consumers. Query the activity feed through other routes the site exposes, not only the API endpoint, and look for the same rendered body. A positive result is the secret string appearing in any view that needs no login.
  • Status changes after posting. Change a parent forum from public to private after topics exist and observe whether previously created feed entries remain visible. A positive result is old entries still served to anonymous callers.

Hunting notes

This class of bug hides where one plugin integrates with a second plugin and re-implements an access decision instead of reusing the one that already works. The tell is a permission helper called with an argument that narrows its scope, especially a true/false value that disables a hierarchy or parent check. When you review such code, compare the check used for the object's own page with the check used for every derived copy: feeds, activity streams, search indexes, sitemaps, notifications and API endpoints.

During recon, look for sites running bbPress together with BuddyPress and map the forum hierarchy. A public child under a private or hidden parent is the configuration to look for. The confirmation pattern is simple and strong: the permalink returns 404 while a request with no login to the activity endpoint returns the body. Demonstrating both in the same report, as done here, shows the access control is inconsistent rather than absent, which is what makes the impact clear.

Glossary

  • WordPress: the software that runs the website; plugins add features to it.
  • Plugin: an add-on piece of software installed into WordPress to add a feature.
  • bbPress: the WordPress plugin that adds forums.
  • BuddyPress: the WordPress plugin that adds a social network and an activity feed.
  • Activity stream / feed: a public list of recent events on a social site, like a timeline.
  • hide_sitewide: a setting on a feed entry that decides whether it is shown to everyone or restricted.
  • Forum hierarchy / nesting: forums arranged inside other forums, like folders inside folders.
  • Parent forum: the forum one level above another in that hierarchy.
  • Subforum / child forum: a forum that sits inside a parent forum.
  • Private / hidden forum: a forum whose content is meant to be restricted to certain users.
  • Permalink: the permanent web address of a page, such as a topic page.
  • 404: the standard HTTP response meaning "page not found".
  • HTTP 200: the standard HTTP response meaning "OK, here is the result".
  • HTTP status code: a number a server sends back to say how a request went.
  • API: a way for software to request data from a website in a structured form, rather than as a page for humans.
  • REST endpoint: a specific URL on an API that returns a particular kind of data.
  • JSON: a common text format for structured data, made of names and values.
  • Cookie: a small piece of data a browser stores and sends back to a site, often used to stay logged in.
  • Session: the logged-in state a site keeps for you, usually tracked with a cookie.
  • Nonce: a one-time code placed in a form to prove the request really came from the site.
  • curl: a command-line tool for sending web requests.
  • Shell variable: a named value stored in a command-line session, such as $N.
  • grep: a command-line tool that searches text and prints matching lines or parts.
  • Unauthenticated: not logged in; a visitor with no account or session.
  • Access control: the rules that decide who may see or do what.
  • Access control bypass: getting around those rules to reach something you should not.
  • Information disclosure / data leakage: private information being shown to people who should not see it.
  • Root cause: the underlying reason a bug happens, as opposed to its visible symptom.
  • Severity: a rating of how serious a bug is; here, medium.
  • Recon: the early stage of looking around a target to understand how it is built.
  • Sitemap: a file listing a site's pages, often for search engines.

More from WordPress

View all

The newest disclosed reports for this program.

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.