Attacco Magecart Hacker Giacomo Lanzi

Magecart attack: what it is and how to protect yourself

Estimated reading time: 6 minutes

Every day we hear about some new technology threats or vulnerabilities. Lately we talk about the data collection attack known as “Magecart”. Let’s try to understand what it is and how we can do to defend ourselves.

Magecart is a large group of hackers as well as a typical attack that mainly targets online shopping carts. This type of attack has become very common in recent years.

What is the Magecart attack?

Gli hacker di Magecart di solito prendono di mira i negozi online sviluppati con Magento CMS e mirano a rubare le informazioni della carta di credito dei clienti. Questo tipo di attacco è anche conosciuto come supply chain attack, web skimming o e-skimming. Il codice JavaScript iniettato nel sorgente durante l’attacco è solitamente chiamato anch’esso Magecart.

The experts of cyber security noticed this activity of the criminal group in 2010, even though Magecart is become very well known recently. For over 10 years of observation, the Magecart attack has been detected about 2 million times. Since 2010, Magecart is responsible for hacking more than 18,000 hosts. By driving the malicious code, the criminals used 573 domains with about 10,000 download links with Magecart malware.

Today, researchers are reporting a new series of Mageсart attacks. Criminals have changed tactics and automated attacks. Now they are looking for badly set targets to infect the websites and JavaScript files they can reach. Since April 2019, cybercriminals have compromised over 17,000 domains by publishing JavaScript code (also called “ skimmer “) on these websites.

According to Computerweekly , Magecart attacks on online retailers increased by 20% during the COVID-19 pandemics.

Magecart Javascript attack

How the Magecart-attack works

data skimming attacks such as Magecart typically follow a well-established pattern. They must achieve three things to be successful.

1. Go to the site

There are typically two ways attackers gain access to the website and place the skimming code. They can break into your infrastructure or server and put the skimmer there. Or, they’ll go to one of your third-party vendors, especially if they’re an easier target, and infect a third-party tag that will execute a malicious script on your site when invoked in the browser.

2. Collect sensitive information

There are many different ways in which groups can capture data, but the skimming code is almost always a JavaScript script that listens to personal information and collects it. We have seen an approach in which they monitor all keystrokes on a sensitive page or even interception of input in specific parts of a webform such as the credit card and CVV fields . Generally, attackers hide malicious code inside other code, which appears benign, to avoid detection.

3. Send the data to a server

This is the simplest part of the whole process. Once the hackers have access to your website and collect the data they want, the game is over. They can send information from end-user browsers to almost any place on the Internet.

Magecart Card attack

The current state

As we have already mentioned, the Magecart attack is mainly distributed via malicious JavaScript code injected into downloadable plugins or add-ons for Magento online stores. Lately, attackers have started using banner ads to distribute skimmers .

In 2019, during a lightning attack, cybercriminals hacked nearly 1000 e-commerce sites in just 24 hours , proving that they didn’t act manually, but instead used automated tools. Most of the resources affected were small e-shops, although they also include several large companies.

The skimming script was used to steal information from online store visitors, specifically, their bank card details, names, phone numbers and addresses. Then the script records all data entered on payment pages and stores them in the browser until the victim refreshes the page or switches to another tab. The stolen data is then sent to a server controlled by the cybercriminals.

How to deal with the situation

The problem with Magecart is that there is a lot of confusion when it comes to actually protecting these web-based card skimming attacks. For example, auditing of a website on a regular basis cannot stop the attacks, as the problem comes from third party tags, which auditing will not detect.

The advice for IT teams is to take a zero-trust approach with JavaScript on their sites, starting with a policy to block default access to any sensitive information placed in web forms and stored cookies. From there, you only allow a select set of controlled scripts (usually your own) to access sensitive data. And as a result, if this type of skimming code enters the site, it simply cannot access any of the sensitive information.

The advice for IT teams is to take a zero-trust approach with JavaScript on their sites, starting with a policy to block default access to any sensitive information placed in web forms and stored cookies. From there, you only allow a select set of controlled scripts (usually your own) to access sensitive data. And as a result, if this type of skimming code enters the site, it simply cannot access any of the sensitive information.

Magecart Hacker Attack

How to actively protect yourself

To protect your company from Magecart attacks, take a complete inventory of your digital assets using our CTI service . Next, find all possible web and mobile applications, set a security score for each of them, and show which apps are to be fixed and secured. The service can also search the Dark Web, cloud archives and code repositories for all possible data leaks.

The approach adopted is proactive and is based on looking for compromises before they have occurred. This approach, which actively manages the attack surface and scans the dark web, allows for a complete view of the security status of the digital system.

After a complete inventory you can proceed with a Penetration Test to verify the situation and protect your company from any security threats. The Magecart attack, as well as other more modern attack methods that cybercriminals are constantly inventing, can only be countered with this kind of proactive approach, keeping your guard up.

If you have any questions or would like to know how our services can secure your business, please do not hesitate to contact us.

Useful links:

Share


RSS

More Articles…

Categories …

Tags

RSS Unknown Feed

RSS Full Disclosure

  • [REVIVE-SA-2026-001] Revive Adserver Vulnerabilities January 15, 2026
    Posted by Matteo Beccati on Jan 14======================================================================== Revive Adserver Security Advisory REVIVE-SA-2026-001 ------------------------------------------------------------------------ https://www.revive-adserver.com/security/revive-sa-2026-001 ------------------------------------------------------------------------ Date: 2026-01-14 Risk Level: High Applications affected: Revive...
  • Defense in depth -- the Microsoft way (part 95): the (shared) "Start Menu" is dispensable January 11, 2026
    Posted by Stefan Kanthak via Fulldisclosure on Jan 10Hi @ll, the following is a condensed form of and . Windows Vista moved the shared start menu from "%ALLUSERSPROFILE%\Start Menu\" to "%ProgramData%\Microsoft\Windows\Start Menu\", with some shortcuts (*.lnk) "reflected" from the (immutable) component store below %SystemRoot%\WinSxS\ JFTR:...
  • Re: Multiple Security Misconfigurations and Customer Enumeration Exposure in Convercent Whistleblowing Platform (EQS Group) January 11, 2026
    Posted by Art Manion via Fulldisclosure on Jan 10Hi, CVE IDs *can* be assigned for SaaS or similarly "cloud only" software. For a period of time, there was a restriction that only the provider could make or request such an assignment. But the current CVE rules remove this restriction: 4.2.3 CNAs MUST NOT consider the […]
  • RIOT OS 2026.01-devel-317 Stack-Based Buffer Overflow in RIOT ethos Serial Frame Parser January 11, 2026
    Posted by Ron E on Jan 10A stack-based buffer overflow vulnerability exists in the RIOT OS ethos utility due to missing bounds checking when processing incoming serial frame data. The vulnerability occurs in the _handle_char() function, where incoming frame bytes are appended to a fixed-size stack buffer (serial->frame) without verifying that the current write index […]
  • RIOT OS 2026.01-devel-317 Stack-Based Buffer Overflow in tapslip6 Utility via Unbounded Device Path Construction January 11, 2026
    Posted by Ron E on Jan 10A stack-based buffer overflow vulnerability exists in the tapslip6 utility distributed with RIOT OS (and derived from the legacy uIP/Contiki networking tools). The vulnerability is caused by unsafe string concatenation in the devopen() function, which constructs a device path using unbounded user-controlled input. Specifically, tapslip6 uses strcpy() and strcat() […]
  • TinyOS 2.1.2 Stack-Based Buffer Overflow in mcp2200gpio January 11, 2026
    Posted by Ron E on Jan 10A stack-based buffer overflow vulnerability exists in the mcp2200gpio utility due to unsafe use of strcpy() and strcat() when constructing device paths during automatic device discovery. A local attacker can trigger the vulnerability by creating a specially crafted filename under /dev/usb/, resulting in stack memory corruption and a process […]
  • TinyOS 2.1.2 printfUART Global Buffer Overflow via Unbounded Format Expansion January 11, 2026
    Posted by Ron E on Jan 10A global buffer overflow vulnerability exists in the TinyOS printfUART implementation used within the ZigBee / IEEE 802.15.4 networking stack. The issue arises from an unsafe custom sprintf() routine that performs unbounded string concatenation using strcat() into a fixed-size global buffer. The global buffer debugbuf, defined with a size […]
  • KL-001-2026-01: yintibao Fun Print Mobile Unauthorized Access via Context Hijacking January 8, 2026
    Posted by KoreLogic Disclosures via Fulldisclosure on Jan 08KL-001-2026-01: yintibao Fun Print Mobile Unauthorized Access via Context Hijacking Title: yintibao Fun Print Mobile Unauthorized Access via Context Hijacking Advisory ID: KL-001-2026-001 Publication Date: 2026-01-08 Publication URL: https://korelogic.com/Resources/Advisories/KL-001-2026-001.txt 1. Vulnerability Details      Affected Vendor: yintibao      Affected Product: Fun Print Mobile      Affected […]
  • Multiple Security Misconfigurations and Customer Enumeration Exposure in Convercent Whistleblowing Platform (EQS Group) January 6, 2026
    Posted by Yuffie Kisaragi via Fulldisclosure on Jan 05UPDATE: Following the publication of these vulnerabilities and the subsequent CVE assignments, the CVE identifiers have now been revoked. The vendor (EQS Group) contacted the CVE Program (via a CNA) and disputed the records, stating that the affected product is an exclusively hosted SaaS platform with no customer-managed […]
  • Panda3d v1.10.16 Uncontrolled Format String in Panda3D egg-mkfont Allows Stack Memory Disclosure January 6, 2026
    Posted by Ron E on Jan 05Panda3D’s egg-mkfont utility contains an uncontrolled format string vulnerability that allows disclosure of stack-resident memory. The -gp (glyph pattern) command-line option allows users to specify a formatting pattern intended for generating glyph texture filenames. This pattern is passed directly as the format string to sprintf() without validation or sanitization. […]

Customers

Newsletter

{subscription_form_1}