Recently patched vulnerabilities in the popular AMP for WP plugin are being targeted in an active Cross-Site Scripting (XSS) campaign, Wordfence reports.
With over 100,000 installs, the plugin adds Accelerated Mobile Pages (Google AMP Project) functionality to websites, which makes them faster for mobile users.
Given its popularity, AMP for WP also represents a lucrative target for cybercriminals, especially if site admins are behind with their patching efforts. To exploit the newly discovered vulnerabilities, an attacker needs a minimum of subscriber-level access on a vulnerable site.
Revealed last week, the vulnerabilities allow an attacker to leverage privileges and make administrative changes to a website. Thus, any website using a vulnerable version of the AMP for WP plugin could be targeted with malware/code injection. Version 0.9.97.20 of AMP for WP addresses the issue.
According to Wordfence, cybercriminals are already targeting the vulnerabilities, which is not surprising, given how easy they can be exploited. All that an attacker needs is an active user login session, which allows them to make the necessary calls to the plugin regardless of the permissions they have on the site.
The most prevalent attacks against the bugs attempt to inject an XSS payload to target logged-in administrators. As soon as the admin’s browser executes the malicious script, a larger payload is fetched from the attacker’s command and control (C&C) server.
The script has a range of features, including one that attempts to hijack the affected administrator’s browser session to register a new administrator account.
“After creating a hidden iframe element on the page being viewed by the affected administrator, the script simulates the process of filling out the New User form. As part of this process it selects the Administrator role and sends a click() event to the submit button to create a new user with admin access,” Wordfence explains.
At the same time, the script attempts to backdoor code into the affected site’s plugins. Thus, the attacker can then execute arbitrary PHP code on infected sites, even if they cannot use the rogue administrator account.
The attackers attempted to hide the source of the attacks, but they made an error in the User-Agent string used in the malicious requests, which made all assaults easily traceable, Wordfence says.