What’s Vulnerable › Vulnerabilities
CVE-2024-31211: Remote Code Execution in `WP_HTML_Token`
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.8% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-04-04 · updated 2026-06-17
- Weakness: CWE-502
Description
WordPress is an open publishing platform for the Web. Unserialization of instances of the `WP_HTML_Token` class allows for code execution via its `__destruct()` magic method. This issue was fixed in WordPress 6.4.2 on December 6th, 2023. Versions prior to 6.4.0 are not affected.
Affected products
- WordPress: from 6.4.0 before 6.4.2 — fixed in 6.4.2
How to fix
Upgrade to a fixed version: WordPress 6.4.2. Check the vendor advisory for mitigations.
References
- https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-m257-q4m5-j653
- https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-m257-q4m5-j653
Get alerted when CVE-2024-31211 or the next vulnerability affects your stack