CVE-2026-104995 BP Profile Search <= 5.9 - Unauthenticated Local File Inclusion to Remote Code Execution via 'bps_directory' Cookie 'ajax_template' Value
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
- Technology
- PHPWordPress
Description
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.
Upgrade path
2 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| dontdream BP Profile Search | <= 5.9 | after 5.9 | Fixed |
| wordpress bp-profile-search(WordPress) | < 6.0 | 6.0 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| dontdream BP Profile Search | <= 5.9 | No fix listed |
| wordpress bp-profile-search(WordPress) | < 6.0 | 6.0 |
References
- www.wordfence.com
- plugins.trac.wordpress.org
- plugins.trac.wordpress.org
- plugins.trac.wordpress.org
- plugins.trac.wordpress.org
- Wordfence Intelligence third-party-advisory
- www.cve.org
- ENISA EUVD EUVD-2026-100768 third-party-advisory