Magecart Skimmers Hid JavaScript in PNG and EXIF Image Data
Sector Threat Intelligence · 2 sources · Updated 3mo ago · First seen May 2, 2020

Researchers uncovered Magecart-style web skimming campaigns that concealed malicious JavaScript inside image files to evade detection on compromised e-commerce sites. In one case affecting Magento 2.x stores, injected code retrieved a seemingly legitimate PNG file at /pub/media/wysiwyg/m2themes/googletagmanager.png, extracted data appended after the PNG IEND marker, and executed the hidden payload in the browser to steal payment information entered at checkout.
A related campaign hid skimmer code in EXIF metadata and used image files for data theft, showing attackers were abusing trusted media formats both to stage malware and to exfiltrate stolen credit-card details. Investigators also found the Magento skimmer relied on a booby-trapped GitHub repository, mag202/magento, where malicious mage.png files were repeatedly uploaded and removed to update payloads and derive exfiltration gates tied to lookalike domains such as fontsgoogle-apis[.]com and googletag-manager[.]com, underscoring a broader shift toward image-based concealment and legitimate-platform abuse in web skimming operations.


