WordPress has issued version 6.4.2 to remedy a recently discovered remote code execution (RCE) vulnerability tied to a Property Oriented Programming (POP) chain flaw within WordPress core 6.4. This vulnerability, detected by the project’s security team, introduces the risk of arbitrary PHP code execution, especially when combined with certain plugins or themes. The critical aspect of this security concern lies in the need for an attacker to control all properties of a deserialized object, facilitated by PHP’s unserialize() function.
A consequence of this control is the potential to manipulate the application’s flow by influencing values sent to magic methods like ‘_wakeup()’. While the RCE vulnerability is not directly exploitable in the WordPress core, the security team highlights its potential severity when combined with specific plugins, particularly in multisite installations. The risk is contingent on the existence of a PHP object injection flaw on the target site, which might be present in a plugin or theme add-on. A PSA by WordPress security experts at Wordfence delves into technical details, pointing to the ‘WP_HTML_Token’ class introduced in WordPress 6.4 to enhance HTML parsing in the block editor as the source of the issue.
The class’s ‘__destruct’ magic method, utilizing ‘call_user_func’ to execute a function defined in the ‘on_destroy’ property, becomes exploitable in the context of an object injection vulnerability, allowing an attacker to gain control over properties and execute arbitrary code. While the severity of this vulnerability increases the overall risk for WordPress sites, its exploitation is not standalone. Object injection on installed and active plugins or themes is a prerequisite for a successful attack. Despite this, the security community emphasizes the importance of site administrators updating to the latest WordPress version (6.4.2) to mitigate potential risks. Although most updates are designed to install automatically, manual verification is recommended to ensure the completion of the update process. The urgency is underlined by the existence of an exploit chain for this issue, discovered on GitHub and later added to the PHPGGC library, which is widely used in PHP application security testing. In summary, while the RCE vulnerability is contingent on specific conditions, a proactive approach to updating remains crucial for securing WordPress sites.
Referral link