CVE-2026-16585

Better Messages <= 2.15.19 - Authenticated (Administrator+) Arbitrary File Deletion via Path Traversal via 'file' Parameter

2026-07-27 16:36
Wordfence PRISM

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
View all Better Messages – Chat Rooms, Group Chat, Private Messages & AI Chat Bots vulnerabilities

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

Vulnerability data © Defiant, Inc., provided under the Wordfence Intelligence T&C