CVE-2026-7795

The Click to Chat – WA Widget plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the [chat] shortcode 'num' parameter in all versions up to, and including, 4.38. This is due to insufficient escaping when embedding user-supplied shortcode attribute values inside JavaScript string literals that are then placed in HTML event-handler attributes. The CCW_Shortcode::shortcode() function applies esc_attr() to the 'num' parameter (line 157), which converts single quotes to the HTML entity '. This entity-encoded value is then interpolated directly into a JavaScript window.open() call string delimited by single quotes (line 194/221), and that complete string is placed verbatim into an HTML onclick attribute in the style template files (e.g., sc-style-1.php line 6). Because browsers HTML-decode event attribute values before executing the embedded JavaScript, the ' entities are decoded back to literal single quotes at runtime, allowing the injected payload to break out of the JavaScript string context and execute arbitrary code. This makes it possible for authenticated attackers with Contributor-level access and above to inject arbitrary web scripts into pages that will execute whenever a user clicks the WhatsApp chat button rendered by the [chat] shortcode.
Configurations

No configuration.

History

23 Jul 2026, 07:10

Type Values Removed Values Added
Summary
  • (es) El plugin Click to Chat - WA Widget para WordPress es vulnerable a Stored Cross-Site Scripting a través del parámetro 'num' del shortcode [chat] en todas las versiones hasta la 4.38, inclusive. Esto se debe a un escape insuficiente al incrustar valores de atributos de shortcode proporcionados por el usuario dentro de literales de cadena de JavaScript que luego se colocan en atributos de gestor de eventos HTML. La función CCW_Shortcode::shortcode() aplica esc_attr() al parámetro 'num' (línea 157), lo que convierte las comillas simples en la entidad HTML '. Este valor codificado como entidad se interpola directamente en una cadena de llamada a window.open() de JavaScript delimitada por comillas simples (línea 194/221), y esa cadena completa se coloca textualmente en un atributo onclick de HTML en los archivos de plantilla de estilo (por ejemplo, sc-style-1.php línea 6). Debido a que los navegadores decodifican HTML los valores de los atributos de evento antes de ejecutar el JavaScript incrustado, las entidades ' se decodifican de nuevo a comillas simples literales en tiempo de ejecución, lo que permite que la carga inyectada escape del contexto de la cadena de JavaScript y ejecute código arbitrario. Esto hace posible que atacantes autenticados con acceso de nivel Colaborador y superior inyecten scripts web arbitrarios en páginas que se ejecutarán cada vez que un usuario haga clic en el botón de chat de WhatsApp renderizado por el shortcode [chat].

06 Jun 2026, 04:17

Type Values Removed Values Added
New CVE

Information

Published : 2026-06-06 04:17

Updated : 2026-07-23 07:10


NVD link : CVE-2026-7795

Mitre link : CVE-2026-7795

CVE.ORG link : CVE-2026-7795


JSON object : View

Products Affected

No product.

CWE
CWE-79

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')