If you have credit card form on your WooCommerce Checkout page, it is time to worry. We have noticed that a large part of the Payment Gateway plugins allows customers to enter credit card information on the same checkout page. Though if you did not save this data in your online store, in case of favourable opportunities, it could be read and saved to a file on another server. If hackers manage to find a vulnerability in your online store, it is very likely that it will be possible to inject a keylogger that can steal your customers’ credit card data.
The difference between entering data in your WooCommerce store and payment provider page
An example of how credit card details can be stolen
You have credit card fields on the checkout page, and you use some plugins, and one of them has a vulnerability such as “stored XSS”, which is quite often found in various plugins. We remind you that the more plugins you use, the greater the risk of having security issues. Always evaluate your plugins. “Stored XSS” vulnerability allows the hacker to place a keylogger in your online store and affect the credit card’s input fields, i.e. send them to the hacker.
Keylogger is uploaded using the security vulnerability in Advanced Search for WooCommerce plugin.
The uploaded keylogger looks like this. It is loaded on every page including the checkout page.
When the “Place Order” button is pressed, this code collects the credit card details, i.e. the cardholder’s name, card number, expiry date and security code, and sends these data using the HTTP POST method to the file on the hacker’s server.
Then, on the hacker’s server, all of this data is stored in the credit_cards.txt file, the PHP code looks like this:
All saved data can be viewed in the credit_cards.txt file.