Attacco Magecart Hacker Piergiorgio Venuti

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 feed: Unknown Feed Unknown Feed

RSS feed: Full Disclosure Full Disclosure

  • Code Security Review tool September 22, 2026
    Posted by E. Kellinis on Sep 22Karma Pro is an open source code review tool that can assist code reviewers with a multitude of useful tools. Karma Pro is a macOS source-code security scanner (AST base and Heuristics) that statically analyses projects in multiple languages. It's backed by an ML classifier trained on real patches […]
  • HP Advance / Output Central: unauthenticated SYSTEM RCE and two additional vulnerabilities (CVE-2026-89082/89083/89084) September 22, 2026
    Posted by Joe via Fulldisclosure on Sep 22HP Advance / HP Output Central Unauthenticated SYSTEM RCE, authorization bypass, and arbitrary file write/delete CVE-2026-89082, CVE-2026-89083, CVE-2026-89084 ================================================================ SUMMARY ================================================================ Vendor: HP Inc. Product family named by HP: HP Advance Products in HP's update table: HP AC Print & Scan; HP Output Central Components:...
  • CFP No cON Name 2k26 - Palma, Mallorca - Spain September 22, 2026
    Posted by Jose Nicolas Castellano on Sep 22No cON Name 2026 - Palma, Mallorca - Balearic Islands ************************************ *****  Call For Papers        ****** ************************************ https://www.noconname.org/call-for-papers/ Exact place not disclosed until a few weeks before due celebration.     * INTRODUCTIONfulldisclosure () seclists org The organization has  opened CFP proposals. No cON Name […]
  • CVE-2026-17613: Penpot cross-team file takeover via import-binfile (unpatched in 2.17.2) September 22, 2026
    Posted by Louis Sanchez via Fulldisclosure on Sep 22Posting this as an update rather than a first disclosure. The advisory went public on 2026-08-04 with no vendor fix. Penpot has shipped two releases since then, 2.17.1 and 2.17.2 -- the latter 14 days ago, on 2026-08-27 -- and I re-checked the code this morning: the […]
  • CVE-2026-44756: Pre-Auth RCE in SAP EPP Processing (ICM, Web Dispatcher, disp+work) September 22, 2026
    Posted by Raschin Tavakoli via Fulldisclosure on Sep 22nullFaktor Security Advisory < 2026-09-10 > =========================================================== Title: Pre-Authentication Remote Code Execution in SAP Extended Passport (EPP) processing library Affected Components: ICM, SAP Web Dispatcher, dialog work processes Vulnerability: Stack based Buffer Overflow CVE: CVE-2026-44756 Impact: Critical CVSS 4.0 Vector:...
  • [0day-rubbish] TigerGraph Community Edition 4.2.4 Default credentials plus GSQL TO_CSV arbitrary file write to SSH code execution (9.8) September 22, 2026
    Posted by disclosure via Fulldisclosure on Sep 220day Rubbish Research Team is publicly disclosing a vulnerability in TigerGraph Community Edition 4.2.4. Type: Default credentials plus GSQL TO_CSV arbitrary file write to SSH code execution (CWE-798) CVSS: 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) Impact: command execution as the tigergraph service user (uid 1001), which owns the engine, graph data, catalog […]
  • [0day-rubbish] Teltonika RutOS 00.07.06.21 Authenticated ipsec.lua logread command injection with reflected output (8.8) September 22, 2026
    Posted by disclosure via Fulldisclosure on Sep 220day Rubbish Research Team is publicly disclosing a vulnerability in Teltonika RutOS 00.07.06.21. Type: Authenticated ipsec.lua logread command injection with reflected output (CWE-78) CVSS: 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) Impact: root command execution on the router, with command output reflected into the JSON response Authentication: authenticated administrator Full technical analysis and […]
  • APPLE-SA-09-14-2026-10 Xcode 27 September 22, 2026
    Posted by Apple Product Security via Fulldisclosure on Sep 22APPLE-SA-09-14-2026-10 Xcode 27 Xcode 27 addresses the following issues. Information about the security content is also available at https://support.apple.com/149040. Apple maintains a Security Releases page at https://support.apple.com/100100 which lists recent software updates with security advisories. Xcode IDE Available for: macOS Tahoe 26.6 and later Impact: An […]
  • APPLE-SA-09-14-2026-9 Safari 27 September 22, 2026
    Posted by Apple Product Security via Fulldisclosure on Sep 22APPLE-SA-09-14-2026-9 Safari 27 Safari 27 addresses the following issues. Information about the security content is also available at https://support.apple.com/149039. Apple maintains a Security Releases page at https://support.apple.com/100100 which lists recent software updates with security advisories. Safari Available for: macOS Sequoia and macOS Tahoe Impact: A malicious […]
  • APPLE-SA-09-14-2026-8 visionOS 27 September 22, 2026
    Posted by Apple Product Security via Fulldisclosure on Sep 22APPLE-SA-09-14-2026-8 visionOS 27 visionOS 27 addresses the following issues. Information about the security content is also available at https://support.apple.com/149038. Apple maintains a Security Releases page at https://support.apple.com/100100 which lists recent software updates with security advisories. Accelerate Framework Available for: Apple Vision Pro (all models) Impact: Processing […]

Customers