Wordpress: Remote Code Execution in `WP_HTML_Token` (CVE-2024-31211)
A critical remote code execution vulnerability exists in WordPress due to unsafe unserialization of WP_HTML_Token class instances via its __destruct() method. This flaw affects WordPress versions from 6.4.0 up to but not including 6.4.2. The issue was fixed in WordPress 6.4.2 released on December 6th, 2023.
AI Analysis
Technical Summary
WordPress versions >=6.4.0 and <6.4.2 contain a vulnerability in the WP_HTML_Token class where unserialization of its instances allows execution of arbitrary code through the class's __destruct() magic method. This flaw enables remote code execution. The vulnerability was addressed and fixed in version 6.4.2.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary code remotely on affected WordPress installations, potentially leading to full system compromise. The vulnerability is rated critical due to the severity of remote code execution.
Mitigation Recommendations
Upgrade affected WordPress installations to version 6.4.2 or later, where this vulnerability has been fixed. No additional mitigation steps are indicated beyond applying the official patch.
Wordpress: Remote Code Execution in `WP_HTML_Token` (CVE-2024-31211)
Description
A critical remote code execution vulnerability exists in WordPress due to unsafe unserialization of WP_HTML_Token class instances via its __destruct() method. This flaw affects WordPress versions from 6.4.0 up to but not including 6.4.2. The issue was fixed in WordPress 6.4.2 released on December 6th, 2023.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
WordPress versions >=6.4.0 and <6.4.2 contain a vulnerability in the WP_HTML_Token class where unserialization of its instances allows execution of arbitrary code through the class's __destruct() magic method. This flaw enables remote code execution. The vulnerability was addressed and fixed in version 6.4.2.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary code remotely on affected WordPress installations, potentially leading to full system compromise. The vulnerability is rated critical due to the severity of remote code execution.
Mitigation Recommendations
Upgrade affected WordPress installations to version 6.4.2 or later, where this vulnerability has been fixed. No additional mitigation steps are indicated beyond applying the official patch.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BIT-wordpress-2024-31211
- Osv Schema Version
- 1.5.0
- Aliases
- ["CVE-2024-31211"]
- Ecosystems
- ["Bitnami"]
- Database Specific Severity
- Critical
Threat ID: 6aa005adacd9273b49ab4bf7
Added to database: 09/08/2026, 12:55:09 UTC
Last enriched: 09/08/2026, 13:06:59 UTC
Last updated: 09/10/2026, 19:36:48 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.