A critical security flaw has been identified in the WPML (WordPress Multilingual) plugin, a widely used tool for creating multilingual websites on WordPress. The vulnerability, tracked as CVE-2024-6386 and assigned a CVSS score of 9.9, poses a significant risk by allowing authenticated users to execute arbitrary code remotely under certain conditions. All versions of the plugin prior to 4.6.13 are affected.
CVE-2024-6386 arises from a lack of input validation and sanitization within the plugin, specifically in its handling of shortcodes. These shortcodes are used to embed various types of post content, including audio, images, and videos. The flaw is rooted in how WPML utilizes Twig templates to render content within shortcodes. The absence of proper sanitization allows for server-side template injection (SSTI), a dangerous vulnerability that enables attackers to inject and execute malicious payloads via the native template syntax.
The vulnerability primarily impacts users with Contributor-level access or higher, enabling them to execute arbitrary commands on the server. This means that an attacker could potentially take control of the affected website, leading to unauthorized access, data breaches, and further exploitation. Although the plugin's maintainers, OnTheGoSystems, note that the specific conditions required for exploitation are uncommon, the high CVSS score indicates the potential severity if the right conditions are met.
Security researcher stealthcopter, who discovered and reported the flaw, highlighted the risks associated with the SSTI vulnerability. "The flaw occurs because the WPML plugin fails to properly sanitize input in Twig templates, which are used for rendering content in shortcodes," stealthcopter explained. "This oversight makes it possible for an attacker to inject server-side scripts that can be executed on the server, leading to complete site compromise."
To protect against potential exploitation, it is critical for WPML users to update to version 4.6.13 or later, which includes a fix for this vulnerability. Site administrators should ensure that all WordPress plugins are regularly updated to the latest versions to mitigate security risks. Additionally, reviewing and limiting user permissions can help reduce the attack surface.
This vulnerability underscores the importance of robust input validation and sanitization practices in plugin development. As plugins like WPML are widely used in building and maintaining multilingual WordPress sites, maintaining their security is paramount to safeguarding web assets. Administrators and developers should stay vigilant, applying security patches promptly and regularly reviewing security practices to protect against emerging threats.
© 2016 - 2025 Red Secure Tech Ltd. Registered in England and Wales under Company Number: 15581067