Skip to content
Technology

Hackers Are Hiding Malware in 1-Pixel SVGs — What Every Designer Needs to Know About SVG Security in 2026

A 1×1 pixel SVG just stole credit card data from 99 e-commerce stores. SVG-based attacks are up 50x since 2024. Here's how the attack works, why Adobe still hasn't patched it, and how to protect yourself.

Robin MonteiroApril 12, 202612 min read
Use this article with an AI assistant:
.md
Hackers Are Hiding Malware in 1-Pixel SVGs — What Every Designer Needs to Know About SVG Security in 2026
R
Robin Monteiro

Founder of VectoSolve

Self-taught developer, founder and sole developer of VectoSolve since 2024. He builds the conversion engine and the cutting, embroidery and 3D printing exports.

How this article was made: drafted with AI assistance, then edited and fact-checked before publication. About the author

Image vectorizationCutting machine filesEmbroidery filesSVG
Free previewNo signupFull-quality output

Try it on your own file

Free preview, no signup. Drop an image and see the vector before deciding anything.

A Single Pixel Stole Millions in Credit Card Data

On April 7, 2026, security researchers at Sansec discovered something chilling: 99 Magento e-commerce stores had been silently compromised by a credit card skimmer hidden inside a 1×1 pixel SVG element. The entire malware payload — the fake checkout form, the data encryption, the exfiltration logic — was encoded in a single onload attribute.

No external scripts. No suspicious network requests to flag. Just one invisible pixel, quietly stealing every credit card number entered on the checkout page.

The entry point? A vulnerability called PolyShell (APSB25-94), disclosed in mid-March 2026, that affects every production version of Magento Open Source and Adobe Commerce. By the time Sansec found the skimmers, 56% of all vulnerable stores had already been targeted — within just one week of the vulnerability's disclosure.

And here's the worst part: as of April 12, 2026, Adobe has not released a production security patch. The fix exists only in a pre-release alpha build (2.4.9-alpha3+). An estimated 130,000 online stores running Magento remain vulnerable, representing $173 billion in annual gross merchandise value.

Warning: Adobe advisory APSB25-94 covers this vulnerability, but no production patch has been released. If you run Magento, check the Indicators of Compromise listed below immediately.

How Does a 1-Pixel SVG Steal Credit Cards?

This attack is elegant in its simplicity and terrifying in its stealth. Here's exactly how it works, step by step:

Step 1: The PolyShell Entry

The attacker exploits Magento's REST API file upload functionality. When a product option has type "file," Magento processes an embedded file_info object with base64-encoded file data. The uploaded file is a polyglot — it functions simultaneously as a valid image AND an executable script.

According to Searchlight Cyber's analysis, the file is written to pub/media/custom_options/quote/ on the server, and depending on server configuration, leads to remote code execution (RCE) or stored XSS leading to account compromise.

Active exploitation began on March 19, 2026 — just two days after disclosure. No less than 50 IP addresses engaged in automated mass scanning (source).

Step 2: The Invisible SVG

Once inside, the attacker injects a tiny SVG element into the store's HTML:

xml
<svg width="1px" height="1px" onload="(()=>{setTimeout(atob('KGZ1bmN0aW9uKCl7IGlm...'),1)})()"></svg>

The entire skimmer payload is base64-encoded inside an atob() call and executed via setTimeout. As Sansec's researchers noted:

"

This technique avoids creating external script references that security scanners typically flag. The entire malware lives inline, encoded as a single string attribute.

— Sansec Research

Step 3: The Fake Checkout

When a buyer clicks checkout, the script intercepts and displays a convincing "Secure Checkout" overlay — complete with a lock icon for perceived legitimacy. The form includes credit card fields and billing address, with real-time Luhn validation of card numbers. Victims see exactly what they expect to see.

Step 4: The Exfiltration

Captured payment data is:

  1. XOR-encrypted with the key "script"
  2. Base64-obfuscated via btoa()
  3. Sent via fetch() POST with no-cors mode (fallback: hidden iframe; some variants use WebRTC for stealthy exfiltration)
  4. Routed to /fb_metrics.php — disguised as Facebook analytics

Six exfiltration domains were identified, all hosted at IP 23.137.249.67 (IncogNet LLC, AS40663, Netherlands):

DomainConfirmed Victims
statistics-for-you.com15 stores
statistics-renew.com14 stores
morningflexpleasure.com14 stores
reusable-flex.com12 stores
goingfatter.com11 stores
wellfacing.com10 stores

A _mgx_cv key is set in the browser's localStorage after data capture, preventing duplicate victim submissions. On April 10, IncogNet confirmed they deactivated the offending account — but the underlying Magento vulnerability remains unpatched.

Why Are SVG Files Dangerous?

This attack exploits a fundamental truth that many designers overlook: an SVG file is XML, and XML can contain executable code. Unlike PNG or JPEG, which are pure pixel data, SVGs can include JavaScript, HTML, external resource references, and even entity expansion attacks.

SVG security — sanitization shield blocking malicious scripts while allowing clean vector paths
SVGs can contain JavaScript, event handlers, and external references — sanitization is critical

Security researchers at Fortinet have documented four primary SVG attack vectors:

  1. Cross-Site Scripting (XSS) — SVGs support ECMAScript via <script> elements. Any SVG with a script tag can execute arbitrary JavaScript in the viewer's browser.

  2. HTML Injection — The foreignObject element enables XHTML embedding inside SVGs, bypassing HTML context restrictions that would normally prevent injection.

  3. XML Entity Processing — Internal and external entity declarations can expose sensitive data or trigger server-side request forgery (SSRF). The classic "Billion Laughs" attack uses recursive entity expansion.

  4. Denial of Service — Recursive xlink:href usage with <use> elements can crash XML parsers by creating infinite loops.

Dangerous SVG elements and attributes to watch for:

CategoryElements/AttributesRisk
Event handlersonload, onclick, onmouseover, onerror, onfocusExecute arbitrary JS
Scripting<script>, href="javascript:..."Full code execution
EmbeddingforeignObject, <iframe> inside SVGHTML injection
External refsxlink:href="http://...", <use href="...">Data exfiltration, SSRF
Entity expansion<!ENTITY> declarationsDoS, data exposure

How Bad Is the SVG Malware Problem in 2026?

SVG-based attacks aren't new, but the scale in 2025-2026 is unprecedented:

StatisticValueSource
Malicious SVG increase (YoY)50x (2024 → 2025)VirusTotal
SVG share of malicious attachments5% (3rd most common file type)Malwarebytes
Undetected by ALL antivirus engines44 unique SVG filesVirusTotal
Magento stores vulnerable to PolyShell130,000V-Formation
Annual GMV at risk$173 billionV-Formation
PolyShell exploitation rate56% within 1 weekPCRisk
Scanning IPs after disclosure50+BleepingComputer
Global SVG phishing campaignsMultiple targeting banksIBM X-Force

Recent high-severity CVEs involving SVGs:

  • CVE-2026-33172 (CVSS 8.7) — Statamic stored XSS via SVG reupload bypasses sanitization
  • CVE-2026-22610 (CVSS 8.5) — Angular XSS via SVG script attributes; sanitization schema fails to recognize href and xlink:href on SVG <script> elements. Fix requires Angular v21.0.7+.

IBM X-Force tracked a global SVG phishing campaign throughout 2025 targeting financial institutions, using weaponized SVGs with embedded JavaScript for multi-stage malware infections. Infrastructure included Amazon S3 and Telegram for C2.

The problem isn't going away. As more platforms accept SVG uploads — from CMS systems to design tools to e-commerce platforms — the attack surface grows exponentially.

How Can You Protect Your SVGs? (Interactive Checklist)

Whether you're a designer uploading SVGs to client sites, a developer building an upload feature, or an e-commerce store owner, these seven rules will protect you:

Recommended sanitization libraries:

LanguageLibraryNotes
JavaScriptDOMPurifyMost popular, battle-tested
PHPphp-svg-sanitizerUsed by WordPress
Pythonbleach + custom SVG rulesMozilla-maintained
GobluemondayWhitelist-based

How Does VectoSolve Keep SVGs Clean?

If you're wondering whether the SVGs you create could harbor hidden threats — it depends entirely on how they're made.

SVGs created by manual coding or exported from design tools can contain event handlers, scripts, or metadata that you didn't intentionally add. SVGs downloaded from unknown sources are even riskier.

VectoSolve takes a fundamentally different approach. We generate SVGs from raster images using Recraft AI — the output is pure vector geometry:

  • No JavaScript — our SVGs contain only <path>, <circle>, <rect>, and other shape elements
  • No event handlers — no onload, onclick, or any other executable attributes
  • No foreignObject — no embedded HTML or iframes
  • No external references — no xlink:href to remote URLs
  • SVGO post-processing — every SVG is optimized and stripped of unnecessary metadata, comments, and editor data

Our SVGs are clean by design, not by sanitization. There's nothing malicious to strip because we never generate it in the first place. The entire pipeline is: raster image → AI vectorization → SVGO optimization → clean SVG output.

Pro Tip: If you're auditing SVG files you didn't create, open them in a text editor and search for: <script, onload, onclick, onerror, foreignObject, javascript:, and xlink:href="http. If any of these appear, the file needs sanitization before use.

What Should You Do Right Now?

If you run a Magento store:

  1. Search your HTML source for SVG tags with onload containing atob()
  2. Check browser localStorage on your checkout page for _mgx_cv
  3. Monitor server logs for requests to /fb_metrics.php
  4. Block connections to IP 23.137.249.67 and the six domains listed above
  5. Search for files in pub/media/custom_options/quote/ that shouldn't be there
  6. Apply the pre-release patch (2.4.9-alpha3+) or implement WAF rules
  7. Consider a full security audit — if PolyShell was exploited, other backdoors may exist

If you work with SVGs:

  1. Complete the security checklist above — all 7 items
  2. Never upload SVGs from untrusted sources without server-side sanitization
  3. Use <img> tags (not <object> or <iframe>) to render external SVGs
  4. Set Content-Security-Policy headers to block inline scripts
  5. Generate your SVGs through vectorization tools like VectoSolve that produce clean output by design

Key Takeaways

  • 99 Magento stores compromised via 1×1 pixel SVGs containing credit card skimmers on April 7, 2026
  • The PolyShell vulnerability (APSB25-94) affects ALL production Magento/Adobe Commerce versions
  • Adobe has NOT released a production patch — only pre-release 2.4.9-alpha3+
  • 130,000 stores ($173 billion GMV) remain vulnerable; 56% exploited within 1 week of disclosure
  • SVG malware increased 50x from 2024 to 2025; 44 files evaded every antivirus engine
  • IoCs: _mgx_cv in localStorage, /fb_metrics.php requests, IP 23.137.249.67
  • Always sanitize SVGs server-side with whitelist-only approaches (DOMPurify, php-svg-sanitizer)
  • VectoSolve generates clean SVGs with zero executable code — safe by design

Need clean, safe SVGs? Try VectoSolve — our vectorization produces pure geometry with zero executable code. No scripts, no surprises.

Tags:
svg security
svg malware
polyshell
magento hack
credit card skimmer
xss
svg sanitization
web security
magecart
e-commerce security
Share:

Try Vectosolve Now

Convert your images to high-quality SVG vectors with AI

AI-Powered Vectorization

Ready to vectorize your images?

Convert your PNG, JPG, and other images to high-quality, scalable SVG vectors in seconds.