Better Messages <= 2.15.19 - Authenticated (Administrator+) Arbitrary File Deletion via Path Traversal via 'file' Parameter
Strategic Overview
- Status
- Patched in 2.15.20
- Affected Version
<= 2.15.19- CVSS
- 7.2High
- Weakness type
- CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
- CVE
CVE-2026-16585
At a glance
CVE-2026-16585 is a high-severity Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in the Better Messages WordPress plugin, affecting versions <= 2.15.19. It carries a CVSS score of 7.2 (reachable over the network; low attack complexity; high confidentiality, integrity, availability impact). Exploitation requires an authenticated account at Administrator level or above. The issue is fixed in version 2.15.20; sites on affected versions should update now. Disclosed July 2026, reported by Wordfence PRISM.
Vulnerability Overview
The Better Messages – Chat Rooms, Group Chat, Private Messages & AI Chat Bots plugin for WordPress is vulnerable to arbitrary file deletion due to insufficient file path validation in the delete_sticker function in all versions up to, and including, 2.15.19. This makes it possible for authenticated attackers, with administrator-level access and above, to delete arbitrary files on the server, which can easily lead to remote code execution when the right file is deleted (such as wp-config.php). The prefix check intended to restrict deletion to the uploads directory can be bypassed by crafting a URL that begins with the legitimate uploads base URL but embeds ../ traversal sequences in the path portion, as the normalize_sticker function only applies esc_url_raw(), which does not strip ../ sequences, allowing the traversal payload to be stored verbatim in WordPress options.
Technical Analysis
The vector marks this flaw as remotely reachable over the network, with low attack complexity — no special timing or configuration is needed, and no interaction from a victim user. A successful exploit has high impact on confidentiality, integrity, availability — full site compromise territory.
CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Better Messages <= 2.15.19 carries this weakness at esc_url_raw(), and reaching it takes an account at Administrator level or above. Path traversal happens when user-controlled text is used to build a filesystem path without being constrained to an intended directory, so sequences like ../ walk the resolved path somewhere else.
Depending on the operation, it means reading files outside the intended folder — wp-config.php being the usual target — or writing to and deleting paths the web server can touch. For Better Messages the fix is 2.15.20: builds <= 2.15.19 are affected, anything from 2.15.20 onward is not.
Remediation
Update to version 2.15.20, or a newer patched version
How does WordSec protect against this?
An attacker needs Administrator access first, so the firewall sees the attempt as traffic from a logged-in account: WordSec's web application firewall inspects request payloads before WordPress loads them. None of that substitutes for the fix: Better Messages 2.15.20 closes this, and updating the plugin is the step that ends it.
- Firewall
- Alerts
External References
Related records
Other vulnerabilities in Better Messages – Chat Rooms, Group Chat, Private Messages & AI Chat Bots
- 8.8CVE-2022-36389: Better Messages <= 1.9.9.148 CSRF
CVE-2022-36389 - 8.8CVE-2022-29454: Better Messages <= 1.9.9.148 CSRF
CVE-2022-29454 - 8.8CVE-2021-24809: BP Better Messages <= 1.9.9.37 CSRF
CVE-2021-24809 - 7.7CVE-2022-33142: Better Messages <= 1.9.10.57 Resource Exhaustion
CVE-2022-33142 - 7.5CVE-2024-13611: Better Messages Info Exposure
CVE-2024-13611 - 7.4CVE-2022-41609: Better Messages <= 1.9.10.68 SSRF
CVE-2022-41609 - 7.2CVE-2026-84812: Better Messages Stored XSS
CVE-2026-84812 - 7.2CVE-2026-32547: Better Messages Stored XSS
CVE-2026-32547
Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C