Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-24340

CVE-2021-24340: WP Statistics Auth Bypass Vulnerability

CVE-2021-24340 is an authentication bypass vulnerability in WP Statistics WordPress plugin that exposed admin-only pages to unauthenticated users. This article covers the technical details, affected versions, and mitigation.

Published: February 25, 2026

CVE-2021-24340 Overview

CVE-2021-24340 is a SQL Injection vulnerability affecting the WP Statistics WordPress plugin before version 13.0.8. The vulnerability arises from improper use of the WordPress esc_sql() function on a field that was not delimited by quotes, combined with a failure to properly prepare the query. Compounding this issue, an administrative page that should have been restricted was accessible to any visitor, including unauthenticated users, allowing remote attackers to exploit this flaw without authentication.

Critical Impact

This vulnerability allows unauthenticated remote attackers to execute arbitrary SQL queries against WordPress databases, potentially exposing sensitive information from over 600,000 affected sites.

Affected Products

  • Veronalabs WP Statistics versions prior to 13.0.8
  • WordPress installations running vulnerable WP Statistics plugin
  • Sites using the WP Statistics plugin for visitor analytics

Discovery Timeline

  • 2021-06-07 - CVE CVE-2021-24340 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-24340

Vulnerability Analysis

This SQL Injection vulnerability stems from a fundamental misunderstanding of WordPress security functions. The esc_sql() function in WordPress is designed to escape strings for use in SQL queries, but it only provides protection when the escaped value is properly enclosed in quotes within the SQL statement. When the vulnerable parameter is used without quote delimiters, the escaping becomes ineffective, allowing attackers to break out of the intended query structure and inject malicious SQL commands.

The second critical flaw is the exposure of an administrative-only page to unauthenticated users. This broken access control issue transforms what might have been a limited administrative vulnerability into a fully unauthenticated attack vector accessible to any remote attacker.

Root Cause

The root cause is twofold: first, the developers relied on esc_sql() without understanding its limitations when used with unquoted fields in SQL queries. WordPress provides the $wpdb->prepare() method specifically to handle parameterized queries safely, which was not utilized in this case. Second, improper access control allowed unauthenticated users to reach the vulnerable endpoint.

Attack Vector

The attack can be executed remotely over the network without requiring any authentication or user interaction. An attacker can craft malicious HTTP requests containing SQL injection payloads targeting the vulnerable parameter. Since the affected page is accessible to unauthenticated visitors, attackers can directly send exploitation requests to extract database contents, including sensitive user data, credentials, and other confidential information stored in the WordPress database.

The vulnerability specifically allows for data extraction (confidentiality impact) as the SQL injection enables arbitrary SELECT queries. The lack of proper query parameterization means attackers can leverage techniques such as UNION-based injection or time-based blind injection to exfiltrate database contents.

Detection Methods for CVE-2021-24340

Indicators of Compromise

  • Unusual SQL-like patterns in web server access logs targeting WP Statistics endpoints
  • Unexpected database queries or errors logged by WordPress or MySQL
  • Access attempts to administrative WP Statistics pages from unauthenticated sessions
  • Time-based delays in page responses that may indicate blind SQL injection attempts

Detection Strategies

  • Monitor web application firewall (WAF) logs for SQL injection patterns in requests to WP Statistics URLs
  • Implement database query logging and alert on unusual SELECT statements or query errors
  • Review WordPress access logs for requests to /wp-admin/admin.php with page=wps_ parameters from unauthenticated sources
  • Deploy intrusion detection rules that flag common SQL injection payloads in HTTP parameters

Monitoring Recommendations

  • Enable WordPress debug logging to capture database errors that may indicate exploitation attempts
  • Configure web server access logging with full request parameters for forensic analysis
  • Set up real-time alerting for patterns associated with SQL injection testing tools
  • Monitor database server performance metrics for unusual query patterns or load

How to Mitigate CVE-2021-24340

Immediate Actions Required

  • Update WP Statistics plugin to version 13.0.8 or later immediately
  • If update is not immediately possible, temporarily disable the WP Statistics plugin
  • Review web server logs for evidence of exploitation attempts
  • Audit database for potential data exfiltration if exploitation is suspected

Patch Information

The vulnerability was addressed in WP Statistics version 13.0.8. Users should update to this version or later through the WordPress plugin update mechanism. The fix properly implements parameterized queries using $wpdb->prepare() and restricts access to administrative pages to authenticated users with appropriate capabilities. Additional details can be found in the WPScan Vulnerability Report and the Wordfence Blog Analysis.

Workarounds

  • Temporarily disable the WP Statistics plugin until the update can be applied
  • Implement web application firewall rules to block SQL injection patterns targeting WP Statistics endpoints
  • Restrict access to WordPress admin pages at the web server level if possible
  • Use security plugins that provide virtual patching capabilities for known vulnerabilities
bash
# Example: Disable WP Statistics plugin via WP-CLI
wp plugin deactivate wp-statistics

# After updating, verify the installed version
wp plugin get wp-statistics --field=version

# Update to the latest patched version
wp plugin update wp-statistics

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechVeronalabs Wp Statistics

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability83.26%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-89
  • Technical References
  • WPScan Vulnerability Report

  • Wordfence Blog Analysis
  • Related CVEs
  • CVE-2022-4230: WP Statistics Plugin SQLi Vulnerability

  • CVE-2022-25149: WP Statistics Plugin SQLi Vulnerability

  • CVE-2022-0513: WP Statistics SQL Injection Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English