StyleSmuggler and recent attacks on Magento stores: how hackers operate and how to reduce risk
The past few days have shown something that online store administrators have known for a long time, but that is easy to ignore in day-to-day maintenance: an up-to-date system does not always mean a secure system. When a 0-day vulnerability appears, attackers do not wait for an official vendor announcement, an assigned CVE number, or a convenient time to deploy a patch. Automated tools scan the internet, look for vulnerable endpoints, and try to install persistent access faster than most companies can schedule a meeting.
This is exactly what the StyleSmuggler case looks like: an actively exploited vulnerability reported by Sansec on September 5, 2026. According to Sansec, the attacks began on September 4 and affect Magento Open Source and Adobe Commerce. The key message for store owners is harsh: the vulnerability was also observed on installations considered fully updated.
This text is not an attack guide. It is a practical summary of what a modern breach of an e-commerce store looks like and what can be done here and now, before an official vendor patch appears or is confirmed.
What happened?
StyleSmuggler is described as unauthenticated RCE, meaning the ability to execute code on the server without logging in to the admin panel. In simple terms: the attacker does not need an admin password, a compromised employee account, or SSH access. A vulnerable application exposed to the internet is enough.
According to public analyses, the attack consists of several stages:
- The attacker sends a crafted request to Magento using a GraphQL endpoint.
- Malicious code is placed somewhere Magento later processes on its own.
- The application executes the code during a standard email handling mechanism, including the payment failure scenario.
- A backdoor is installed on the server, creating a persistent return mechanism.
This is a particularly dangerous model because it does not require an employee to click a link or a successful login attempt. The store can be attacked solely because it is publicly accessible.
How do hackers operate today?
Breaches of online stores increasingly rarely resemble manual 'hacking' of a single target. More often, they look like an automated campaign:
- scanning the internet for a specific endpoint,
- sending ready-made attempts to exploit the vulnerability,
- installing a process that impersonates a legitimate system component,
- maintaining access through cron or another autostart mechanism,
- collecting sessions, secrets, API keys, or payment data,
- potentially installing an additional webshell, skimmer, or another backdoor.
In the case of StyleSmuggler, two details are especially important. First, the backdoor may be located outside the store directory, so a simple check of Magento files is not enough. Second, the process may impersonate a system component, for example with a name similar to kworker, fc-cache, or chronyd. To an untrained eye, this may look harmless, but when it runs under the web user it should raise a red flag.
Why is patch level alone not enough?
With a typical vulnerability, the answer is simple: check the version, update, and close the topic. With a 0-day, the situation is different. For a period of time, the vulnerability is exploited before the vendor publishes a patch or before the patch is clearly linked to a specific attack.
That is why after this type of incident, two questions must be separated:
- is the store still vulnerable?
- has the store already been compromised earlier?
These are not the same thing. A WAF, a GraphQL block, or a later patch may reduce further attempts, but they do not automatically remove a backdoor that may have been installed earlier.
What should you do immediately?
1. Temporarily restrict or disable GraphQL
If the store does not use GraphQL, the simplest decision is to temporarily block /graphql until a confirmed patch is available. Many classic Magento stores, including many implementations based on Hyvä, do not need public GraphQL for the frontend to work. It is different for headless and PWA stores - there, a block may stop sales, so more precise WAF rules or traffic restrictions are required.
Example direction for nginx:
map $uri $gql_block { default 0; ~*^/+(index\.php/+)?graphql(\.php)?(/|$) 1;}In each Magento vhost, before the remaining location directives:
if ($gql_block) { return 403;}After changing the configuration:
nginx -t && systemctl reload nginxIf Varnish runs in front of the store, it is also worth clearing the cache:
varnishadm ban 'req.url ~ .'After deployment, check different path variants, not just the ideal /graphql. The test should include, among others, /graphql, /GraphQL, /graphql/, /graphql.php, /index.php/graphql, and variants with double slashes. The expected result for GraphQL is 403, and for the store homepage a normal response, for example 200.
2. Block the known styles[...] vector
If you cannot disable all of GraphQL, at least apply rules that block the observed styles[...] parameter in the query string and known post-exploitation patterns.
For nginx, you can use rules in this direction:
if ($query_string ~* 'styles(\[|%5[bB])') { return 403;}if ($request_uri ~* '/paypal/transparent/response/.*(eval|base64_decode|%3[cC]%3[fF])') { return 403;}if ($request_uri ~* '%3[cC]%3[fF]|<\?') { return 403;}For Apache, an analogous mechanism can be based on mod_rewrite, blocking raw and encoded occurrences of styles[ as well as attempts to smuggle a PHP tag in the URL.
Important note: these rules see the URL and query string. If an attack variant moves the entire payload into the POST request body, the web server rule alone may not be enough. In that case, you need a WAF that analyzes the body, ModSecurity, a solution such as Sansec Shield, or a temporary GraphQL shutdown.
3. Check whether the store has already been compromised
Blocking further attempts is only half the job. The other half is checking whether the attack has already left traces.
Run the check as the Magento system user:
crontab -l | grep -i gvfsdls -la ~/.local/share/.gvfsd/ ~/.cache/fontconfig/fc-cache /tmp/.kw_* /tmp/.cache_* /tmp/.gvfsd-* /tmp/.fc-*/fc-cache /tmp/fc-cache 2>/dev/nullps -eo pid,comm,args | grep -iE 'kworker|fc-cache|chronyd'grep -ril 'x_trace_' var/report/Pay particular attention to:
- files in
~/.local/share/.gvfsd/, fc-cachefiles in unusual locations,- temporary directories such as
/tmp/.kw_*,/tmp/.cache_*,/tmp/.fc-*, - cron entries executed every few minutes,
- processes impersonating system processes but running as the store user,
- PHP files in
pub/media, where they normally should not be.
Example of a quick webshell check:
find pub/media -name '*.php' -printIf the result is not empty, it should be treated as an incident, not a cosmetic anomaly.
4. Check access logs
In the logs, look for attempts targeting GraphQL and unusual requests to payment paths. The mere presence of a suspicious request does not always mean a successful breach, but it shows that the store was a target.
In practice, it is worth checking:
- POST requests to
/graphqlwith unusual parameters, - occurrences of
styles[and encodedstyles%5B, - requests to
/paypal/transparent/response/with suspicious fragments, - sudden series of requests from many IP addresses,
- traffic from addresses known from public IOCs.
Working materials mention, among others, the following IOCs: 185.157.160.251, 99.84.67.186, windwsecurity.run, ntp.timesync.to. However, defense should not be limited only to these values. According to incident descriptions, part of the traffic came from a larger address pool and intermediary infrastructure.
5. Secure evidence first, then clean up
This is a common mistake: the administrator sees a suspicious process, kills it, deletes the files, and only then starts the analysis. With a well-written backdoor, this can destroy the most important traces and sometimes even make it harder to recover a sample.
The order should be more conservative:
- Secure nginx/Apache, PHP-FPM, system, Magento, and cron logs.
- Save the list of processes, open files, and network connections.
- Make a copy of suspicious files for analysis.
- Remove cron entries responsible for recreating the process.
- Only then stop processes and remove persistence mechanisms.
- Force users and administrators to log out of their sessions.
- Rotate secrets:
crypt/key, admin passwords, payment API keys, integration keys, SMTP, ERP, PIM, and marketplace keys.
If the store processes payments or customer data, after a confirmed compromise the case must be treated as a full security incident, not as simple 'virus removal'.
A few rules that truly reduce risk
Minimize the public attack surface
Endpoints that the store does not use should not be publicly accessible. This applies to GraphQL, admin panels, staging environments, old demo domains, and forgotten store copies. In e-commerce, it is very often not production that loses, but an old staging environment with a real database and the same secrets.
Separate environments and permissions
The Magento process should not have more access than it needs. No sudo, a separate system account for each store, Redis separation, separate databases, and restricted outbound communication can turn a store compromise into a limited incident instead of an infrastructure-wide disaster.
Monitor processes, cron, and files outside the webroot
Scanning only the Magento directory is not enough. A backdoor can live in the user home directory, in /tmp, in the font cache, or in another location accessible to the application process. Monitoring should include:
- new cron entries,
- unusual processes under the web user,
- new executable files in temporary directories,
- connections to Redis, databases, and the internet,
- changes in
app/etc/env.php, - new administrator accounts.
Update, but do not confuse updating with incident analysis
When Adobe publishes a patch, it must be deployed. But after a 0-day attack, deploying the patch alone does not answer the question of whether someone was already inside. That is why after patching, you should still check IOCs, logs, sessions, and secrets.
Prepare ready-to-use emergency rules
It is worth keeping ready-made snippets for nginx, Apache, Varnish, and WAF in your repository or operational documentation. In a crisis, there is no time to write rules from scratch. Testing blocks on staging before they are needed in production is also a good practice.
What should a store owner do today?
If you run Magento or Adobe Commerce, do at least the following:
- Create a list of all instances: production, staging, demo, work copies.
- Check where GraphQL is public and whether it is actually needed.
- Deploy a temporary GraphQL block or rules that block
styles[...]. - Verify the block with HTTP tests.
- Search the server for processes, cron entries, files, and logs indicating StyleSmuggler.
- If you find IOCs, secure the evidence and treat the case as an incident.
- After the official vendor patch is released, update every instance, including staging and old copies.
- After the update, perform another check and rotate secrets if the store may have been compromised.
The worst decision is to wait until the 'case becomes clear'. With an actively exploited 0-day, time works in the attacker’s favor. Even a temporary block, if well tested and deployed deliberately, can buy valuable hours.
Summary
StyleSmuggler is a good example of modern e-commerce risk: the attack does not start with the admin panel, but with a public endpoint; it does not end with a single file in the store directory, but with a persistent process outside the webroot; and the current patch level does not automatically answer whether the store was safe during the attack window.
Defense must be equally practical: reduce the surface, block the known vector, check for compromise, secure evidence, rotate secrets, and only then consider the issue under control.
In situations like this, the winner is not the one with the nicest security policy, but the one with ready procedures, logs, environment separation, and the ability to quickly deploy emergency rules without stopping the entire business.
Sources and materials
- Sansec:
https://sansec.io/research/stylesmuggler-0day - The Hacker News:
https://thehackernews.com/2026/09/unpatched-magento-and-adobe-commerce.html - Adobe Security Bulletin for Adobe Commerce:
https://helpx.adobe.com/security/products/magento/apsb26-138.html