The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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-47951

CVE-2021-47951: WordPress Picture Gallery XSS Vulnerability

CVE-2021-47951 is a stored cross-site scripting flaw in WordPress Picture Gallery 1.4.2 that lets authenticated attackers inject malicious scripts. This article covers the technical details, affected versions, and mitigation.

Published: May 18, 2026

CVE-2021-47951 Overview

CVE-2021-47951 is a stored cross-site scripting (XSS) vulnerability in the WordPress Picture Gallery plugin version 1.4.2. The flaw resides in the Edit Content URL field within the plugin's Access Control settings. Authenticated attackers can inject JavaScript payloads that the plugin persists in the WordPress database. When an administrator or user triggers the affected functionality, the browser renders the stored payload in the context of the site origin. Successful exploitation enables session hijacking, credential theft, and administrative account takeover. The issue is classified under CWE-79 — Improper Neutralization of Input During Web Page Generation.

Critical Impact

Authenticated attackers can plant persistent JavaScript in plugin settings, leading to session theft and privileged account compromise when the payload executes in an admin browser.

Affected Products

  • WordPress Picture Gallery plugin version 1.4.2
  • WordPress sites with the Picture Gallery plugin installed and Access Control enabled
  • Administrative users interacting with the plugin's Edit Content URL setting

Discovery Timeline

  • 2026-05-10 - CVE-2021-47951 published to NVD
  • 2026-05-12 - Last updated in NVD database

Technical Details for CVE-2021-47951

Vulnerability Analysis

The vulnerability is a stored XSS [CWE-79] in the WordPress Picture Gallery plugin 1.4.2. The plugin accepts user-supplied input in the Edit Content URL field of its Access Control settings without applying output encoding or input sanitization. The submitted value is written to the WordPress options table and later rendered in HTML contexts without escaping. An authenticated user with permission to access the plugin configuration page can embed arbitrary JavaScript. The payload executes whenever an administrator views the affected admin screen or the plugin renders the stored URL. See the VulnCheck Advisory on XSS and Exploit-DB #50187 for additional context.

Root Cause

The plugin treats the Edit Content URL value as trusted data. It does not invoke WordPress sanitization helpers such as esc_url_raw() on input or esc_attr() and esc_html() on output. This allows raw <script> tags and event handlers to persist in plugin options and reach the DOM intact.

Attack Vector

An authenticated user navigates to the Picture Gallery plugin's Access Control configuration page. The attacker submits a JavaScript payload, such as a <script> tag containing code that exfiltrates document.cookie to an attacker-controlled host, in the Edit Content URL field. The value is stored in the database. Each time an administrator loads the affected page, the script runs with the privileges of the active session. Refer to the WordPress Plugin Page and the linked Exploit-DB entry for proof-of-concept details. No verified sanitized exploit code is published here.

Detection Methods for CVE-2021-47951

Indicators of Compromise

  • Plugin option values in the WordPress wp_options table containing <script>, onerror=, onload=, or javascript: strings tied to the Picture Gallery plugin.
  • Outbound HTTP requests from administrator browsers to unfamiliar domains immediately after loading plugin admin pages.
  • New WordPress administrator accounts or unexpected role changes following plugin configuration access.

Detection Strategies

  • Inspect plugin option rows associated with picture-gallery for HTML tags or JavaScript URI schemes in stored URL fields.
  • Review WordPress audit logs for update_option events tied to the Picture Gallery plugin by non-administrator accounts.
  • Deploy a Web Application Firewall (WAF) rule that flags HTML or script characters in plugin settings POST bodies.

Monitoring Recommendations

  • Alert on Content Security Policy (CSP) violation reports originating from /wp-admin/ pages.
  • Monitor for anomalous outbound traffic from administrator workstations after WordPress admin sessions.
  • Track plugin file integrity and configuration changes through file integrity monitoring on wp-content/plugins/picture-gallery/.

How to Mitigate CVE-2021-47951

Immediate Actions Required

  • Uninstall or deactivate the WordPress Picture Gallery plugin version 1.4.2 until a fixed release is confirmed.
  • Audit the wp_options table for malicious payloads stored by the plugin and remove any tainted entries.
  • Rotate WordPress administrator passwords and invalidate active sessions to mitigate possible credential theft.

Patch Information

No vendor patch is referenced in the available CVE data. Consult the WordPress Plugin Page for current version availability and changelog entries. If no patched version is published, remove the plugin and select an actively maintained alternative.

Workarounds

  • Restrict plugin configuration access to trusted administrators by tightening WordPress role capabilities.
  • Apply a strict Content Security Policy that blocks inline scripts in the /wp-admin/ interface.
  • Place WordPress behind a WAF configured to strip HTML and JavaScript from plugin settings parameters.
bash
# Configuration example: disable and remove the vulnerable plugin via WP-CLI
wp plugin deactivate picture-gallery
wp plugin delete picture-gallery

# Audit stored options for injected script content
wp db query "SELECT option_id, option_name FROM wp_options WHERE option_value LIKE '%<script%' OR option_value LIKE '%javascript:%';"

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.1

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • WordPress Plugin Page

  • Exploit-DB #50187

  • VulnCheck Advisory on XSS
  • Related CVEs
  • CVE-2026-6504: Royal Elementor Addons XSS Vulnerability

  • CVE-2026-6174: CC Child Pages WordPress Plugin XSS Flaw

  • CVE-2026-6252: Meta Field Block WordPress Plugin XSS Flaw

  • CVE-2026-3694: Bold Page Builder WordPress 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