A new Magecart-style campaign is actively targeting online shoppers by injecting malicious JavaScript code into e-commerce websites. This sophisticated attack aims to steal sensitive payment information directly from customers during the checkout process, posing a significant threat to both consumers and online retailers. The ongoing campaign highlights the persistent evolution of cyber threats designed to compromise online transactions.
Security analyst Himanshu Anand identified the campaign, tracing its origins to the domain cc-analytics.com, which hosted the malicious JavaScript. The attackers are reportedly deploying similar malicious payloads across multiple e-commerce platforms simultaneously, indicating a widespread and coordinated effort. The compromised data is then exfiltrated to attacker-controlled servers for resale or fraudulent use, exploiting the trust placed in legitimate online shopping environments.
Magecart Exploits E-commerce Vulnerabilities with New JavaScript Attack
The latest Magecart variant showcases advanced obfuscation techniques, making it challenging for security systems to detect and block the malicious code. This stealthy approach allows the attackers to operate undetected for extended periods, continually harvesting customer payment data. Magecart attacks have been a persistent threat for years, with threat actors constantly refining their methods to bypass security measures.
The effectiveness of this attack lies in its ability to remain hidden from both shoppers and website administrators. Attackers inject a simple script tag into the HTML of compromised webpages. This script then operates in the background, silently monitoring user activity on critical forms, particularly those used for entering credit card numbers and billing addresses.
Once a customer enters their payment details, the injected JavaScript intercepts this information in real-time. This theft occurs before the data even reaches the legitimate payment gateway, rendering standard security protocols ineffective at the point of capture. The stolen data is then automatically bundled and sent to attacker-controlled infrastructure, such as the domain pstatics.com, for immediate collection.
This particular campaign is notable for its invisibility. The JavaScript code is designed to run without triggering any browser security alerts or leaving obvious traces of compromise on the infected website. The obfuscation techniques employed render the code unreadable to automated security tools, ensuring its persistence and continuous data exfiltration capabilities.
How the Attack Infection Mechanism Works
The infection mechanism of this Magecart campaign involves a multi-stage process designed for maximum stealth. Initially, a compromised e-commerce website unknowingly hosts the malicious JavaScript. When an unsuspecting customer visits the site, the script quietly loads in the background.
The JavaScript then hooks into crucial elements of the checkout process. This includes targeting specific form fields where sensitive payment information is entered and monitoring interactions with checkout buttons. The primary objective is to capture credit card numbers, expiration dates, CVV codes, and billing addresses as they are typed by the user.
Following the data capture, an automated function immediately exfiltrates the gathered information. This data is sent to remote servers operated by the attackers, often disguised as legitimate analytics or content delivery network domains to further evade detection. By the time a customer completes their transaction, their payment details have already been compromised.
The use of sophisticated obfuscation is a key factor in the success of this attack. Security teams face a significant challenge in identifying and neutralizing such code, as it is designed to evade signature-based detection methods and sandbox analysis. This allows the Magecart operators to maintain access to infected sites and continue their data theft operations without immediate intervention.
The implications of this ongoing campaign are serious. For e-commerce businesses, a successful attack can lead to severe financial losses, reputational damage, and a significant erosion of customer trust. Customers affected by such breaches face the risk of identity theft and financial fraud. The constant evolution of Magecart techniques underscores the need for businesses to adopt robust, multi-layered security strategies, including regular security audits, real-time threat monitoring, and prompt patching of all system vulnerabilities.

