CVE-2026-6275
JSON

6.4medium

StatCounter <= 2.1.1 - Authenticated (Author+) Stored Cross-Site Scripting via Author Nickname

Severity
6.4medium CVSS:3.1 by Wordfence
Exploit likelihood
0.30% (higher than 25% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Wordfence

Description

The StatCounter – Free Real Time Visitor Stats plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 2.1.1 This is due to insufficient output escaping on the post author's nickname in the statcounter_addToTags() function. The function is hooked to wp_head and fires on every single post page. It retrieves the post author's nickname via the_author_meta() and echoes it directly into a JavaScript double-quoted string context inside a <script> block without applying esc_js() or any equivalent JavaScript-context escaping. This makes it possible for authenticated attackers with Author-level access and above to inject arbitrary web scripts into pages that will execute whenever any user (including unauthenticated visitors) accesses a post authored by the attacker.

Affected

Product or packageVersionsReported by
statcounter StatCounter – Free Real Time Visitor Statsup to 2.1.1CVE List

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

The StatCounter – Free Real Time Visitor Stats plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 2.1.1 This is due to insufficient output escaping on the post author's nickname in the statcounter_addToTags() function. The function is hooked to wp_head and fires on every single post page. It retrieves the post author's nickname via the_author_meta() and echoes it directly into a JavaScript double-quoted string context inside a <script> block without applying esc_js() or any equivalent JavaScript-context escaping. This makes it possible for authenticated attackers with Author-level access and above to inject arbitrary web scripts into pages that will execute whenever any user (including unauthenticated visitors) accesses a post authored by the attacker.

NVD (es)

El plugin StatCounter – Free Real Time Visitor Stats para WordPress es vulnerable a cross-site scripting almacenado en versiones hasta, e incluyendo, la 2.1.1. Esto se debe a un escape de salida insuficiente en el apodo del autor de la publicación en la función statcounter_addToTags(). La función está enganchada a wp_head y se activa en cada página de publicación individual. Recupera el apodo del autor de la publicación a través de the_author_meta() y lo imprime directamente en un contexto de cadena de JavaScript entre comillas dobles dentro de un bloque <script> sin aplicar esc_js() ni ningún escape equivalente de contexto de JavaScript. Esto hace posible que atacantes autenticados con acceso de nivel de Autor y superior inyecten scripts web arbitrarios en páginas que se ejecutarán cada vez que cualquier usuario (incluidos los visitantes no autenticados) acceda a una publicación escrita por el atacante.

References

https://www.wordfence.com/threat-intel/vulnerabilities/id/30e0bf40-7f7b-43e6-8439-6dc00a889344?source=cve
https://plugins.trac.wordpress.org/browser/official-statcounter-plugin-for-wordpress/trunk/StatCounter-Wordpress-Plugin.php#L274
https://plugins.trac.wordpress.org/browser/official-statcounter-plugin-for-wordpress/tags/2.1.1/StatCounter-Wordpress-Plugin.php#L274
https://plugins.trac.wordpress.org/browser/official-statcounter-plugin-for-wordpress/trunk/StatCounter-Wordpress-Plugin.php#L266
https://plugins.trac.wordpress.org/browser/official-statcounter-plugin-for-wordpress/tags/2.1.1/StatCounter-Wordpress-Plugin.php#L266
https://plugins.trac.wordpress.org/changeset?old_path=%2Fofficial-statcounter-plugin-for-wordpress/tags/2.1.1&new_path=%2Fofficial-statcounter-plugin-for-wordpress/tags/2.1.2

Sources

SourceRecordLicence
CVE ListCVE-2026-6275 changed 2026-05-29CVE Terms of Use
NVDCVE-2026-6275 changed 2026-07-21Public domain