Attackers Inject Code into WordPress Theme to Redirect Visitors
Essential information
- Published
- 11/07/2025 06:42
- Modified
- 13/07/2025 12:19
- Tags
- 2025-07-11 code injection curl file_get_contents footer.php r2048 function redirect theme injection wordpress
- Related entities
- 2 observables, 5 techniques (mitre)
Description
An analysis reveals a recent attack vector targeting WordPress themes, specifically injecting malicious code into the footer.php file. The injected code uses a function called r2048 to retrieve a URL from a remote server and redirect visitors. This method is particularly insidious as it's not visible from the WordPress dashboard. The attackers utilize either cURL or file_get_contents to fetch the redirection URL, allowing for dynamic control over the destination based on factors like the user's browser or device. This technique underscores the importance of regular theme and plugin audits, as well as securing FTP and SSH access to prevent unauthorized file modifications.