Security Experts:

Connect with us

Hi, what are you looking for?



WordPress Malware Targets WooCommerce Stores

Researchers have spotted a piece of WordPress malware that allows cybercriminals to collect information from WooCommerce stores and helps them set up compromised websites for future skimming attacks.

Researchers have spotted a piece of WordPress malware that allows cybercriminals to collect information from WooCommerce stores and helps them set up compromised websites for future skimming attacks.

WooCommerce is a highly popular open-source eCommerce plugin for WordPress that allows site owners to easily set up their own online store. With more than 5 million installations, it is one of the biggest eCommerce platforms and is often targeted by cybercriminals for financial gain.

Attacks part of an ongoing campaign targeting vulnerable WordPress plugins employ malicious code designed to identify whether sites are using WooCommerce and then query data related to it, web security company Sucuri revealed.

Following initial exploitation, a malicious file is injected into the website’s hosting environment, which provides the attackers with the ability to map what the user/owner of the file has access to.

Written in PHP, the malware creates a series of functions used to search for other WordPress websites and connect to their database to gather WooCommerce data.

One of the functions defined in the malicious file recursively searches the surrounding directories, looking for wp-config.php in any directory and then for the default /wp-content/plugins/woocommerce/ directory.

If the second directory is found, WooCommerce related data is expected to be stored in the $woo[] variable array. The malware also implements a function to extract MySQL login data from available wp-config.php files, and another function to use the extracted credentials to access the WordPress database.

The malware submits a total of three SQL queries to the WordPress database, to get the number of orders, query the row data for orders in the posts table placed after March 1, 2020, and to search the postmeta table for data related to orders made on or after March 1. This allows the attackers to determine if the compromised store is active and if it has made transactions recently.

Furthermore, the malware drops three backdoors to any identified directory, and then provides the attacker with URLs to the first backdoor.

Responding to a SecurityWeek inquiry, Sucuri’s security researchers said that none of the backdoors contained any WooCommerce specific skimmers. However, the attackers are believed to be setting up for future skimmer attacks against the already backdoored WooCommerce websites.

“If the backdoors are removed and the attackers lose access then they will still have the customer data (not any of the payment data information) that can still be sold for identity theft purposes,” the researchers said.

According to the researchers, although it still needs some refinement, the malware is a great example of how attackers can abuse unauthorized access to identify new targets within compromised hosting environments.

“Since this malware doesn’t load on the front of site, it is best detected with a server-side scanner that can monitor the filesystem for changes and doesn’t merely rely on loading a website to detect indicators of compromise,” Sucuri notes.

Related: Hackers Can Inject Code Into WordPress Sites via Flaw in Product Review Plugin

Related: Flaw in WordPress Plugin Grants Access to Google Search Console

Related: Vulnerabilities in ‘Page Builder’ Plugin Expose 1 Million WordPress Websites

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join this webinar to learn best practices that organizations can use to improve both their resilience to new threats and their response times to incidents.


Join this live webinar as we explore the potential security threats that can arise when third parties are granted access to a sensitive data or systems.


Expert Insights

Related Content


Zendesk is informing customers about a data breach that started with an SMS phishing campaign targeting the company’s employees.


Satellite TV giant Dish Network confirmed that a recent outage was the result of a cyberattack and admitted that data was stolen.


The release of OpenAI’s ChatGPT in late 2022 has demonstrated the potential of AI for both good and bad.


The changing nature of what we still generally call ransomware will continue through 2023, driven by three primary conditions.

Application Security

PayPal is alerting roughly 35,000 individuals that their accounts have been targeted in a credential stuffing campaign.


No one combatting cybercrime knows everything, but everyone in the battle has some intelligence to contribute to the larger knowledge base.


A recently disclosed vBulletin vulnerability, which had a zero-day status for roughly two days last week, was exploited in a hacker attack targeting the...


As it evolves, web3 will contain and increase all the security issues of web2 – and perhaps add a few more.