Automated Threat Modeling

WP Statistics CVE-2025-9816 Stored XSS: Brief Summary and Technical Review

CVE-2025-9816 is a stored cross-site scripting vulnerability in the WP Statistics WordPress plugin, affecting versions up to 14.5.4. This post covers how it works, which versions are affected, and the vendor's security history, based on public information.

CVE Analysis

7 min read

ZeroPath CVE Analysis
ZeroPath CVE Analysis

2025-09-26

WP Statistics CVE-2025-9816 Stored XSS: Brief Summary and Technical Review
Experimental AI-Generated Content

This CVE analysis is an experimental publication that is completely AI-generated. The content may contain errors or inaccuracies and is subject to change as more information becomes available. We are continuously refining our process.

If you have feedback, questions, or notice any errors, please reach out to us.

[email protected]

Introduction

A single HTTP header can carry JavaScript that compromises WordPress admin accounts on over 600000 sites. WP Statistics, a widely deployed analytics plugin, is vulnerable to persistent cross-site scripting that requires no authentication and can be exploited at scale.

WP Statistics is a privacy-focused analytics plugin for WordPress, developed by VeronaLabs. It is one of the most popular plugins in its category, with over 600000 active installations. It gives site owners detailed visitor analytics without relying on external services, and that makes it a preferred choice for privacy-conscious administrators.

Technical Information

CVE-2025-9816 is a stored cross-site scripting vulnerability in WP Statistics, affecting all versions up to and including 14.5.4. The flaw is in how the plugin processes and displays the User-Agent header in its device analytics feature, in the file /includes/admin/templates/pages/devices/models.php at line 31.

When a visitor sends an HTTP request to a WordPress site running a vulnerable version, WP Statistics records the User-Agent header value for analytics. It does not sanitize this input before storing it in the WordPress database. Later, when an administrator opens the device analytics page, the plugin renders the stored User-Agent string directly into the page without output escaping. If the value contains malicious JavaScript, it will execute in the context of the admin user's browser session.

The vulnerability is classified as CWE-79 (Cross-site Scripting) and is a textbook example of stored XSS. The root cause is that the analytics reporting interface neither validates User-Agent data on input nor encodes it on output.

The relevant code is in the official plugin repository:

models.php#L31

Affected Systems and Versions

  • WP Statistics plugin for WordPress
  • All versions up to and including 14.5.4
  • Any WordPress site with the plugin enabled and device analytics reporting active is vulnerable

Vendor Security History

WP Statistics has a documented history of security issues. According to WPScan, at least 31 vulnerabilities have been reported over the plugin's lifetime, including earlier stored XSS and SQL injection flaws. In 2024, CVE-2024-2194 described a similar stored XSS vulnerability. VeronaLabs has patched previous issues, but the recurring problems with input sanitization and output escaping indicate persistent weaknesses in its secure development practices.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization