Magecart Skimmers Hid JavaScript in PNG and EXIF Image Data
Sector Threat Intelligence · 2 sources · Updated 4mo 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.
Why it matters
Impact assessment
Magecart-style skimming activity targeted compromised Magento 2.x e-commerce sites and likely any online storefronts with similar client-side checkout exposure. The primary impact is theft of payment-card data entered at checkout, creating direct fraud risk, PCI exposure, incident response costs, and reputational damage for merchants.
This activity appears targeted at compromised web stores rather than indiscriminate mass exploitation, but the technique is broadly reusable across e-commerce environments. The story describes active malicious skimmer deployments in the wild, including concealment in PNG files on victim sites and related use of EXIF metadata and image-based exfiltration to evade detection.
Affected entities and exposure
- Affected product family: Magento 2.x stores
- Affected population: e-commerce operators, online merchants, and customers entering payment data at checkout
- Data at risk: payment-card details and checkout information
- Exposure scope: targeted compromises of web storefronts, but with techniques applicable to many CMS/e-commerce platforms
Severity drivers
- Client-side skimming captures sensitive payment data before server-side controls can protect it
- Use of trusted media formats and legitimate platforms increases dwell time and reduces detection likelihood
- Abuse of lookalike Google-themed domains can delay triage and increase successful exfiltration
Known in-the-wild activity
- Researchers identified compromised Magento sites serving malicious
googletagmanager.png - Investigators recovered active exfiltration infrastructure tied to attacker-controlled domains
- Related campaign activity used EXIF metadata and image files for staging and exfiltration


