How we recognize a compromised Magento store

Has the store been hacked? How we recognize a compromised Magento store

A hacked online store rarely looks hacked. Orders come in, payments go through, customers do not complain. The attacker wants to stay unnoticed for as long as possible, because every day of access means more card data or more stolen accounts. So the signs are usually small and scattered: one unknown admin account, one line in cron, one extra script on the payment page.

Here we describe where we look when we check whether a Magento store has been compromised. The list is not exhaustive and does not replace a check by a specialist, but it covers the places where traces show up most often. A concrete example is StyleSmuggler, the breach of September 2026.

Four places where a breach leaves traces: the admin, the payment page, the server and the logsFour places where a breach leaves traces: the admin, the payment page, the server and the logs

In the store admin

  • Unknown administrators. An account nobody remembers creating, or an old account of a former employee that is suddenly active.
  • Changed payment settings. A different recipient, a different key for the payment provider, or a new payment method nobody added.
  • Foreign code in the content. Scripts in CMS blocks, in the HTML head and footer settings or in Google Tag Manager that nobody on the team put there.
  • Strange orders or emails. An unusual stream of system messages, for example about failed payments, without a matching rise in real payment attempts.

On the payment page

Card theft happens where the customer enters the card. We look at which scripts the payment page loads and which domains it sends data to. Every domain that does not belong to the store, the payment provider or a known service (analytics, chat) is a reason to check. The malicious script is often disguised under a name that looks familiar, for example with one letter swapped.

On the server

  • Files changed without a deploy. For a store that is only updated through a controlled process, any change to Magento's files outside it is a signal. Especially in vendor/, app/ and in the folders with uploaded images, where a PHP file has no business being.
  • Files outside the store folder. Backdoors often live in /tmp, in hidden folders in the home directory or under the names of system programs. With StyleSmuggler these were, for example, /tmp/.fc_* and ~/.cache/fontconfig/fc-cache.
  • Cron and processes. A new line in the crontab, or a process that poses as a system one but runs from an unusual location.
  • Outgoing connections. A store server rarely needs to connect to unknown addresses. A connection to such an address at regular intervals is typical of a backdoor.

In the logs

The Magento and web server logs show the attempts, including the failed ones. Repeating errors of the same kind, requests to admin URLs from unknown IP addresses, or exceptions that do not appear in normal operation are a reason to take a closer look. With StyleSmuggler one such sign was Laminas\Loader\Exception\InvalidArgumentException in var/log/exception.log.

What to do in the first hour

  1. Delete nothing. The traces are needed to understand when and how the attacker got in and what they took.
  2. Change the passwords for the admin, the server, the database and the connections to payments and couriers.
  3. Stop the unknown accounts and scripts, but keep a copy of them.
  4. Call the team that maintains the store, and the payment provider if you suspect leaked cards.

What to do in the first hour if you suspect a breach: delete nothing, change the passwords, stop the unknown, make the callWhat to do in the first hour if you suspect a breach: delete nothing, change the passwords, stop the unknown, make the call

Closing the hole does not remove an attacker who is already in. That is why after every critical vulnerability we check not only that the fix has been applied, but also whether the store was hit before it.

Worried about your store? Send us its address through the contact page and we will tell you what we see. What our support includes is on the Magento support page.