CVE-2024-31211: Remote Code Execution in `WP_HTML_Token`

CVE-2024-31211 affects 1 listed version of WordPress in the Dawnsentry catalogue.

9.8CVSS critical
None knownexploitation
3%EPSS (next 30 days)
4 April 2024published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

WordPress

1 of 250 listed versions are affected. Fixed in 6.4.2. The newest release, 7.1.5, is not affected.

6.4.1

What it is

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD)

Published by GitHub on 4 April 2024. Last changed 17 June 2026.

Sources

Check one version you run: look CVE-2024-31211 up, or pick a product and version in the quick lookup.

Updated 2 December 2026.