Cybersecurity researchers have uncovered a new MageCart malware campaign targeting e-commerce websites running on the Magento platform.
This attack exploits <img>
HTML tags to conceal malicious JavaScript skimmers, enabling cybercriminals to steal sensitive payment information while evading detection by security tools.
MageCart, a term used to describe credit card skimming malware, has evolved with increasingly sophisticated techniques.
In this instance, attackers embedded Base64-encoded malicious scripts within <img>
tags on checkout pages, an area where users input their credit card details.
The malware activates when users interact with the checkout process, stealing information such as card numbers, expiration dates, and CVV codes.
The <img>
tag is typically considered harmless and widely trusted by browsers.
This trust is exploited by embedding the malicious script within a Base64-encoded string that does not reference any actual image file.
Additionally, an onerror
event handler is used to execute JavaScript if the image fails to load.
While this event is generally employed for legitimate purposes like handling broken images, attackers have repurposed it to activate their skimming script.
According to Sucuri Report, the malware’s placement on the checkout page further enhances its stealth.
By limiting its presence to this critical section of the website, it minimizes the likelihood of detection during routine scans.
Once activated, the script dynamically injects a fake form into the webpage to collect payment details without alerting users.
Upon decoding the Base64 content, researchers found that the script first verifies whether it is running on a checkout page and ensures it hasn’t already executed during the session.
When users submit their payment details, a function named magictrick()
is triggered.
This function collects credit card data and transmits it to a remote server controlled by the attackers.
The stolen information is sent to domains such as “wellfacing[.]com,” where it is likely stored for fraudulent use or sale on dark web marketplaces.
To avoid suspicion, the script also validates input fields to ensure only numeric characters are accepted in credit card fields.
It monitors changes in the webpage layout and reinserts itself if necessary, maintaining its presence undetected.
This attack underscores the growing sophistication of MageCart campaigns and their ability to exploit seemingly benign elements like <img>
tags for malicious purposes.
Such breaches can have devastating consequences for both consumers and businesses.
Stolen credit card data leads to financial fraud for victims, while affected businesses face reputational damage and potential penalties from regulatory bodies.
To mitigate such threats, e-commerce operators should:
As online shopping continues to grow, so does the need for robust cybersecurity measures to safeguard sensitive customer data from evolving threats like MageCart attacks.
Investigate Real-World Malicious Links & Phishing Attacks With Threat Intelligence Lookup - Try for Free
Check Point Software Technologies Ltd. has announced plans to establish its inaugural Asia-Pacific Research and…
A recent investigation into Ivanti Endpoint Manager (EPM) has uncovered four critical vulnerabilities that could…
As of February 2025, ransomware remains a formidable cyber threat, evolving in complexity and scale.…
ESET researchers have uncovered a series of malicious activities orchestrated by a North Korea-aligned group…
Cybersecurity researchers from Palo Alto Networks' Unit 42 disclosed the resurgence of the Bookworm malware,…
A recent investigation has uncovered a malicious application, DriverEasy, masquerading as a legitimate Google Chrome…