Skip to content
Laskyr

CVE-2026-104995: BP Profile Search remote code execution vulnerability

high 8.1 published 2026-10-14

Fixed in BP Profile Search 6.0 (first release after the affected range)

BP Profile Search 5.9 and older is affected by this remote code execution issue. Sites on 6.0 or newer are not affected; the latest release is 6.0.

Affected versions
5.9 and older
Fixed in
6.0 *
Latest version
6.0
Severity
High · CVSS 8.1
Active installs
5,000+
Type
Remote code execution

* The source does not name a fixed version; this is the first wordpress.org release after the last affected version.

What an attacker needs

CVSS vector (score by Wordfence): CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

What to do now

  1. Update BP Profile Search to 6.0 or newer: Dashboard → Updates, or Plugins → “update now”.
  2. If you cannot update right away, deactivate it until you can.
  3. Turn on auto-updates for it: Plugins → “Enable auto-updates” on its row.
  4. Not sure which version you run? Check your version against every known BP Profile Search issue. With WP-CLI: wp plugin get bp-profile-search --field=version.
  5. If you ran an affected version and something looks off (new admin users, spam pages, redirects), run the free scan below.

The advisory

The BP Profile Search plugin for WordPress is vulnerable to Local File Inclusion in versions up to, and including, 5.9 via the 'ajax_template' value parsed from the client-controlled 'bps_directory' cookie during BuddyPress AJAX directory requests. The bps_directory_ajax() filter (hooked onto bp_legacy_object_template_path and bp_nouveau_object_template_path) reads the cookie, applies only a referer-derived 'page' comparison in bps_get_directory_data() (where bps_current_page() uses HTTP_REFERER during AJAX and is therefore also attacker-controlled), and then suffixes the attacker-controlled template value with '.php' and passes it to bp_locate_template() with no basename restriction, no whitelist, and no path-traversal check. This makes it possible for unauthenticated attackers to include arbitrary PHP files on the server, which can lead to remote code execution when PHP files can be uploaded or when images such as the default wordpress:php8.

Description from the CVE record, published by Wordfence (the CVE Numbering Authority), via the NVD entry for CVE-2026-104995.

References

Related

Ran an affected version? Check your site for signs of a hack

The free scan reads the public side of your site and looks for spam pages, hidden redirects, injected scripts and blacklist entries. No login, no install, about a minute.

Where this data comes from

First hour checklist

If the site was just hacked, read the emergency kit before you delete files. The page is free. Email is optional.

Read the emergency kit