Magecart skimmer turns Stripe into a malware command server
Sansec analyzed a sophisticated Magecart skimmer that uses Stripe’s API as both a command server and exfiltration sink. The attacker stores fragmented skimmer code in a Stripe customer’s metadata fields, which a Google Tag Manager loader fetches and executes via new Function() on checkout pages, achieving arbitrary remote code execution. The skimmer targets Magento/Adobe Commerce checkout forms, harvests credit card data and billing details with XOR encoding, and exfiltrates stolen cards back to the attacker’s Stripe account as fake customer records. All malicious traffic flows through trusted domains (api.stripe.com and googletagmanager.com), bypassing CSP rules and network filters that would block unknown attacker domains. The campaign has been active since at least December 2025.