CVE-2026-104995: BP Profile Search <= 5.9 - Unauthenticated Local File Inclusion to Remote Code Execution via 'bps_directory' Cookie 'ajax_template' Value

Published Oct 14, 2026
·
Updated

The BP Profile Search plugin for WordPress is vulnerable to Local File Inclusion in versions up to, and including, 5.9 via the 'ajaxtemplate' value parsed from the client-controlled 'bpsdirectory' cookie during BuddyPress AJAX directory requests. The bpsdirectoryajax() filter (hooked onto bplegacyobjecttemplatepath and bpnouveauobjecttemplatepath) reads the cookie, applies only a referer-derived 'page' comparison in bpsgetdirectorydata() (where bpscurrentpage() uses HTTPREFERER during AJAX and is therefore also attacker-controlled), and then suffixes the attacker-controlled template value with '.php' and passes it to bplocatetemplate() 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.

Affected Software

1 affected component
Andrea Tarantini BP Profile Search<=5.9

Event History

Oct 14, 2026
CVE Published
via MITRE·01:27 AM
Data Sourced
via MITRE·01:27 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What conditions must be present for an attacker to achieve remote code execution?

The attacker can reach the vulnerable BuddyPress AJAX directory request without authentication and control both the bps_directory cookie’s ajax_template value and the HTTP Referer-derived page check. Remote code execution depends on a PHP file being available for inclusion, such as an uploaded PHP file or PHP files present in certain container images.

2

Are default installations affected?

The vulnerable template selection lacks a basename restriction, whitelist, and path-traversal validation. Exploitation targets BuddyPress AJAX directory requests, so exposure depends on the plugin being installed at version 5.9 or earlier and those requests being reachable.

3

What can be done if updating is not immediately possible?

Restrict or disable access to the affected BuddyPress AJAX directory functionality until the vulnerable plugin code can be updated or removed. Also prevent PHP file uploads and review the server or container image for PHP files that could be included.

4

How can I assess whether an installation is vulnerable?

Check whether Andrea Tarantini BP Profile Search is installed at version 5.9 or earlier. Review bps-directory.php for bps_directory_ajax() handling of the bps_directory cookie’s ajax_template value and its use in template resolution without path validation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203