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-2022-21662

CVE-2022-21662: WordPress Core Stored XSS Vulnerability

CVE-2022-21662 is a stored XSS vulnerability in WordPress Core allowing low-privileged users to execute JavaScript and target high-privileged accounts. This article covers technical details, affected versions, and mitigation.

Published: February 17, 2026

CVE-2022-21662 Overview

CVE-2022-21662 is a stored Cross-Site Scripting (XSS) vulnerability in WordPress, the widely-used open-source content management system. This vulnerability allows low-privileged authenticated users, such as those with the Author role, to inject and execute malicious JavaScript code that persists within the WordPress environment. When high-privileged users (administrators, editors) view the affected content, the malicious script executes in their browser context, potentially leading to session hijacking, privilege escalation, or unauthorized administrative actions.

Critical Impact

Low-privileged users can execute stored XSS attacks targeting administrators, potentially leading to complete site compromise through session theft or unauthorized administrative actions.

Affected Products

  • WordPress versions prior to 5.8.3
  • Debian Linux 9.0, 10.0, and 11.0 (via packaged WordPress)
  • All WordPress installations back to version 3.7 (security patches provided down to version 3.7.37)

Discovery Timeline

  • 2022-01-06 - CVE-2022-21662 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-21662

Vulnerability Analysis

This stored XSS vulnerability (CWE-79) exists within WordPress core functionality and can be exploited by authenticated users with limited privileges such as the Author role. The vulnerability allows these users to inject persistent JavaScript payloads that execute when higher-privileged users interact with the compromised content.

The attack requires network access and user interaction—specifically, an administrator or editor must view content created or modified by the attacker. Upon viewing, the injected JavaScript executes within the victim's authenticated session, providing the attacker with the ability to perform actions with the victim's elevated privileges.

The scope of this vulnerability extends beyond the vulnerable component, as successful exploitation can impact the confidentiality and integrity of the broader WordPress installation, including potential access to sensitive administrative functions, user data, and site configurations.

Root Cause

The root cause of CVE-2022-21662 stems from insufficient input sanitization and output encoding within WordPress core. User-supplied content submitted by low-privileged users is not properly validated or escaped before being rendered in contexts where higher-privileged users may view it. This allows HTML and JavaScript injection that persists in the database and executes upon subsequent page loads.

Attack Vector

The attack vector for this vulnerability requires:

  1. An authenticated session with at least Author-level privileges
  2. The ability to create or modify content that will be viewed by administrators
  3. Injection of malicious JavaScript through the vulnerable input mechanism
  4. A high-privileged user viewing the affected content, triggering script execution

The attacker crafts content containing malicious JavaScript payloads. When an administrator accesses the WordPress dashboard or views the affected content, the script executes in their browser with their session cookies and permissions. This can enable session hijacking, creation of rogue administrator accounts, installation of malicious plugins, or modification of site content.

Detection Methods for CVE-2022-21662

Indicators of Compromise

  • Unexpected JavaScript code or suspicious <script> tags in post content, comments, or user-generated fields
  • Unusual administrator account creations or privilege changes without authorization
  • Browser-based attacks detected in web application firewall (WAF) logs originating from stored content
  • Session tokens or cookies being transmitted to external domains

Detection Strategies

  • Deploy web application firewall rules to detect and block common XSS payloads in WordPress content submissions
  • Implement Content Security Policy (CSP) headers to restrict script execution sources and detect policy violations
  • Enable WordPress audit logging plugins to monitor content changes by low-privileged users
  • Review database content for suspicious JavaScript patterns in wp_posts and related tables

Monitoring Recommendations

  • Monitor WordPress admin activity logs for unauthorized administrative actions following content views
  • Configure browser-based XSS auditing and CSP violation reporting
  • Establish baseline behavior for Author-role users and alert on anomalous content patterns
  • Regularly scan WordPress database content for embedded scripts or suspicious markup

How to Mitigate CVE-2022-21662

Immediate Actions Required

  • Update WordPress to version 5.8.3 or later immediately
  • For legacy installations, apply security patches available down to version 3.7.37
  • Enable WordPress automatic updates to receive future security patches
  • Review recent content created by Author-level users for suspicious JavaScript

Patch Information

WordPress has released version 5.8.3 which addresses this vulnerability. Security patches have been backported to all supported WordPress versions, extending back to version 3.7.37. Organizations running Debian Linux should apply the corresponding security updates as documented in DSA-5039 and the Debian LTS Announcement. Fedora users should apply updates via the official package repositories.

For complete details, see the WordPress 5.8.3 Security Release and the GitHub Security Advisory GHSA-699q-3hj9-889w.

Workarounds

  • No official workarounds are available; patching is the only complete remediation
  • Implement a Web Application Firewall (WAF) with XSS filtering as a temporary defense layer
  • Restrict Author-level and above privileges to trusted users only until patching is complete
  • Deploy Content Security Policy headers to mitigate JavaScript execution from untrusted sources
bash
# Update WordPress via WP-CLI
wp core update

# Verify WordPress version after update
wp core version

# Enable automatic updates in wp-config.php
# Add the following line:
# define( 'WP_AUTO_UPDATE_CORE', true );

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechWordpress

  • SeverityMEDIUM

  • CVSS Score5.4

  • EPSS Probability13.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Security Advisory

  • Debian LTS Announcement

  • Fedora Package Announcement

  • Fedora Package Announcement

  • Debian Security Advisory
  • Vendor Resources
  • WordPress Security Release
  • Related CVEs
  • CVE-2026-4512: reCaptcha by WebDesignBy XSS Vulnerability

  • CVE-2025-32630: WP-BusinessDirectory XSS Vulnerability

  • CVE-2025-32581: WordPress Spam Blocker XSS Vulnerability

  • CVE-2025-28975: Alike WordPress Plugin XSS 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