CVE-2026-94376: Better Messages <= 3.0.4 - Authenticated (Subscriber+) Stored DOM-Based Cross-Site Scripting via User Display Name
The Better Messages – Chat Rooms, Group Chat, Private Messages & AI Chat Bots plugin for WordPress is vulnerable to Stored DOM-Based Cross-Site Scripting via User Display Name in all versions up to, and including, 3.0.4 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with subscriber-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. This is exploitable by Subscriber-level users because WordPress core's sanitizetextfield() preserves HTML-entity-encoded payloads (e.g., an iframe srcdoc attribute), allowing the encoded string to be stored as a display name without requiring the unfilteredhtml capability, and the plugin subsequently decodes it server-side before rendering.
Affected Software
Event History
Frequently Asked Questions
Which users can exploit this issue?
Any authenticated WordPress user with Subscriber-level access or higher can exploit it. The attacker does not need the unfiltered_html capability because HTML-entity-encoded payloads can be stored in the user display name.
What is required for the injected script to run?
An attacker must first authenticate and set a crafted display name. The script executes when another user accesses a page where the injected display name is rendered.
Are installations running version 3.0.4 affected?
Yes. All Better Messages versions up to and including 3.0.4 are affected.
What aspect of the plugin enables the attack?
The plugin decodes the stored display name server-side before rendering it, while input sanitization and output escaping are insufficient. This allows an entity-encoded HTML payload to become executable markup when displayed.