VYPR
Unrated severityNVD Advisory· Published Feb 28, 2022· Updated Aug 3, 2024

StatCounter < 2.0.7 - Admin+ Stored Cross-Site Scripting

CVE-2021-24920

Description

The StatCounter WordPress plugin before 2.0.7 does not sanitise and escape the Project ID and Secure Code settings, which could allow high privilege users to perform Cross-Site Scripting attacks even when the unfiltered_html capability is disallowed

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

The StatCounter WordPress plugin before 2.0.7 has a stored XSS vulnerability in its settings, allowing high-privilege users to inject arbitrary scripts.

Vulnerability

The StatCounter WordPress plugin versions prior to 2.0.7 fail to sanitize and escape the Project ID and Secure Code settings. This allows high-privilege users (e.g., administrators) to inject arbitrary JavaScript into these fields, which is then stored and executed when the settings page is rendered [1].

Exploitation

An attacker with administrative access to the WordPress dashboard can navigate to the StatCounter settings page and input malicious JavaScript into the Project ID or Secure Code fields. Upon saving the settings, the injected script is stored and will execute in the context of the admin panel whenever the settings are viewed. No additional user interaction is required beyond the initial save [1].

Impact

Successful exploitation results in stored cross-site scripting (XSS) within the WordPress admin area. The attacker can execute arbitrary JavaScript, potentially leading to session hijacking, defacement, or further compromise of the site. The attack is persistent and affects any administrator who visits the settings page [1].

Mitigation

Update the StatCounter plugin to version 2.0.7 or later, which fixes the vulnerability by properly sanitizing and escaping the affected settings. No workarounds are documented. The fix was publicly disclosed on 2022-01-26 [1].

AI Insight generated on May 27, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

2

News mentions

0

No linked articles in our index yet.