WordPress Core 5.8 beta — Stored Cross-Site Scripting in Custom HTML Block
CVE-2021-39202Published · Updated Action summary
Affected: 5.8 beta 1 – 5.8 beta 2Update to 5.8 or newer
All remediation stepsOn this page3
Overview
- Advisory ID
- CVE-2021-39202
- Product
- WordPress wordpress
- Affected
- 5.8 beta 1 – 5.8 beta 2
- Fixed in
- 5.8
- Weakness
- CWE-79 Cross-Site Scripting
- Required access
- Unknown
- Published
- · updated
- Credit
- Evan Ricafort
- Source
- Wordfence Intelligence
- Affected5.8 beta 1 – 5.8 beta 2
- Patched in5.8
Update to 5.8 or newer.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:NWhat does this vector mean?
AV:NAttack vector- Network
AC:LAttack complexity- Low
PR:LPrivileges required- Low
UI:RUser interaction- Required
S:CScope- Changed
C:HConfidentiality- High
I:LIntegrity- Low
A:NAvailability- None
WordPress is a free and open-source content management system written in PHP and paired with a MySQL or MariaDB database. In affected versions the widgets editor introduced in WordPress 5.8 beta 1 has improper handling of HTML input in the Custom HTML feature. This leads to stored XSS in the custom HTML widget. This has been patched in WordPress 5.8. It was only present during the testing/beta phase of WordPress 5.8.
Not sure which version you run? Run a passive check — it reads public files only.
Remediation & mitigations
- Update to version 5.8, or a newer patched version
- Rotate administrator passwords and application secrets if the site ran a vulnerable version while publicly reachable.
References & provenance
Proof-of-concept & detection
No public proof-of-concept or detection template is known for this vulnerability.
Advisories & patches
- Advisorywordfence.com
Related CVEs
| Severity | Vulnerability | CVE | Published |
|---|---|---|---|
| Medium6.4 | Authenticated (Contributor+) DOM-Based Stored Cross-Site Scripting via 'data-text-sec', 'data-title', and 'title' Attributes via Custom HTML Block | CVE-2026-18742 | |
| High7.1 | Unauthenticated PHP Object Injection to Arbitrary File Deletion via 'comment_content'/'comment_agent' Parameter during Attachment Rename Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization≤4.2.19Update to 4.2.20VulnCrest analysis | CVE-2026-124969 | |
| Critical9.8 | Missing Authorization to Unauthenticated Arbitrary User Password Reset / Account Takeover via Webhook with 'Is the user ID' Field | CVE-2026-126173 | |
| High7.2 | Unauthenticated Stored Cross-Site Scripting via Comment User-Agent Header | CVE-2026-120688 |
- Medium6.4Authenticated (Contributor+) DOM-Based Stored Cross-Site Scripting via 'data-text-sec', 'data-title', and 'title' Attributes via Custom HTML Block
Flatsome
≤3.20.12Update to 3.20.13
- High7.1VulnCrest analysisUnauthenticated PHP Object Injection to Arbitrary File Deletion via 'comment_content'/'comment_agent' Parameter during Attachment Rename
Optimole – Optimize Images | Convert WebP & AVIF | CDN & Lazy Load | Image Optimization
≤4.2.19Update to 4.2.20
- Critical9.8Missing Authorization to Unauthenticated Arbitrary User Password Reset / Account Takeover via Webhook with 'Is the user ID' Field
AutomatorWP Webhooks
≤1.4.4Update to 1.4.5
- High7.2Unauthenticated Stored Cross-Site Scripting via Comment User-Agent Header
EZ SQL Reports Shortcode Widget and DB Backup
≤5.25.25Update to 5.26.45
Timeline
CVE published
Severity high, CVSS 7.6
Record last updated
Sources & licenses
Wordfence record- Vulnerability data
- Wordfence Intelligence. Copyright 2012-2026 Defiant Inc. Licensed under the CC BY-SA 4.0.
- CVE® identifiers
- Copyright 1999-2026 The MITRE Corporation. Used under the CVE Program. CVE® is a registered trademark of The MITRE Corporation.
- CVSS / CWE
- National Vulnerability Database (NVD), shown unmodified. This product uses the NVD API but is not endorsed or certified by the NVD.
- VulnCrest content
- Summary, remediation guidance and page layout © VulnCrest. Not sourced from NVD.
