Skip to content
All posts
Security

Your Magento security scanner says clean. But the skimmer is hiding in the database where file scans cannot reach

Ginny Ngo··Updated 1 December 2026
Your Magento security scanner says clean. But the skimmer is hiding in the database where file scans cannot reach

A Magento scan can say clean while checkout is compromised because file scanners read files on disk, and Sansec reports a campaign that hides a JavaScript loader in the cms_block database table, while the attacker’s side filters out bots and scanners. To check, search cms_block and cms_page for patterns such as fpCode and se_referrer, review admin accounts and uploaded files, apply Adobe’s patches, and test checkout in a real browser.

The scan report says clean. Orders are coming in, nothing has alerted, and every dashboard is green. That reassurance is exactly what a database-resident skimmer relies on. Malicious JavaScript that sits in a Magento CMS block is not a file, so a scanner that walks the web root never reads it, and a loader that hides from bots can look harmless to an automated check of the live page. The store looks fine because, to every tool that was asked, it is fine.

This is not a rare curiosity. In October 2026, Sansec published research describing a loader that a criminal group has placed on 953 stores since July 2025, mostly Magento shops, by writing it into CMS blocks. This guide explains what a CMS block skimmer is, why scanners miss it, and how to check your own store step by step, including what to do if you find something and how to confirm that it is gone. Merchants can run the checks themselves with a developer, and agencies can use them as a repeatable review across client stores.

What is a CMS block skimmer?

It is malicious JavaScript stored in a CMS block, so that every page which renders the block also loads code the attacker controls.

CMS blocks are reusable pieces of content, such as a header promotion, a footer notice, or a homepage banner, that Magento stores in the database and inserts into storefront pages. Whatever HTML sits in a block is shown to every visitor on every page that includes it. If an attacker can write to that content, they can add a small loader that quietly pulls in more code. On a checkout page, code of that kind can read what shoppers type, which is why this class of attack is called a skimmer.

According to Sansec, the campaign has changed its loader domain five times since July 2025. The newest, deepveindrilling.com, appeared in the CMS blocks of 83 stores in October 2026. Sansec also reports that the newer loader fingerprints the visitor’s browser and that bot filtering has moved into the loader, so an automated scanner may be served nothing suspicious. One caution on scope: at the time of its research, Sansec said it had not captured the final content that the newest loader delivers, so what a given infected store was serving to shoppers should be confirmed from its own evidence, not assumed.

Why does my scanner say clean?

Because each tool looks at a different layer, and none of them reads this one by default.

A scan is only as complete as the places it looks. File scanners examine PHP, JavaScript, and templates on disk. A CMS block is a database row, and it is never written to a file. Patch checks tell you whether known flaws are fixed, not whether a store was infected before it was fixed. Scans of the public page see what the page serves to the scanner, which is not necessarily what it serves to a shopper. The table sets out what each layer can and cannot see:

Layer Can catch Can miss
File scanner Malicious files on disk, such as an uploaded webshell Code stored in database rows such as cms_block
Patch or vulnerability check Missing security updates An infection planted before the patch was applied
External scanner or crawler What the storefront serves to it Content an attacker’s server hides from bots and scanners
Content Security Policy Script loads from domains you did not allow, if enforced or reported Anything on an allowed domain, and weak or report-only policies
Database query Suspicious text in cms_block and cms_page Other hiding places, and files on disk
Real browser check of checkout Unexpected requests while a real shopper checks out Payloads that only fire under certain conditions

Not every scanner is blind here. Sansec says its own scanner, eComscan, found the loader in the cms_block table on 148 server installations during the campaign, which shows that database content can be scanned when a tool is built to do it. The practical question for your own store is whether the scanner you rely on reads those tables. Step 6 returns to this.

How to check Magento for CMS block malware

Work through the six steps below with a developer or your agency. The first four look at the database, accounts, files, and patches, and the last two look at what shoppers receive and what your scanner can actually see. Take a backup first, and use a read-only database user for the queries, since every query here only reads data.

Step 1: Search CMS blocks and pages

Start with the patterns Sansec recommends, which are specific to this campaign. Search both tables, because CMS pages use the same rendering mechanism, and adjust the table names if your database uses a prefix.

SELECT block_id, identifier, update_time FROM cms_block WHERE content LIKE '%fpCode%' OR content LIKE '%se_referrer%' OR content LIKE '%localStorage.getItem%';

Run the same query against cms_page. Sansec also advises that loader domains are often Base64-encoded, so a search for a domain name alone can miss them. Read the update_time column too: a block that was last written at a time nobody on the team edited content is worth a closer look.

For a wider net, a broader query for script tags and encoding functions will also match harmless content such as analytics snippets, so expect false positives and treat each hit as a lead, not a verdict:

SELECT block_id, identifier, update_time FROM cms_block WHERE content LIKE '%<script%' OR content LIKE '%atob(%' OR content LIKE '%eval(%';

Unexpected JavaScript, an external script reference, or obfuscated code in CMS content is a reason to investigate, especially if nobody can say who owns that content.

Step 2: Review admin accounts

An attacker who can write to your content often leaves a way back. List the administrator accounts and look for any you do not recognise, any created after your last legitimate change, and any with a generic email address:

SELECT user_id, username, email, created, is_active FROM admin_user ORDER BY created DESC;

Sansec’s investigation advice also covers unknown administrator accounts and the integration tokens that API connections use, so review those at the same time.

Step 3: Look for uploaded files

The entry point is often a file upload. Sansec describes a store on Magento 2.4.7-p1 where PHP webshells disguised as PNG images sat in pub/media/custom_options/quote/, next to a loader in a CMS block. Check that folder and the rest of pub/media for PHP files or files whose type does not match their extension, and look for unfamiliar PHP files and processes elsewhere on the server. Finding a webshell does not replace the database check, and a clean file check does not replace Step 1. They answer different questions.

Step 4: Confirm your patch level

Sansec links part of the campaign to PolyShell, an unauthenticated file-upload flaw, CVE-2026-48356, that Adobe fixed in security bulletin APSB26-73 on 14 July 2026. CISA added it to its Known Exploited Vulnerabilities catalogue on 27 October 2026, and Adobe rates it critical. Confirm that your version has the fix, and apply the latest security updates for your release. Patching closes the entry point, but it does not remove anything already written to your database, and it does not undo access gained through a stolen or rogue credential.

Step 5: Test checkout in a real browser

Open your checkout in a private window, without being logged in to the admin, and watch the network tab in your browser’s developer tools. Note any request to a domain you do not recognise, and compare it with the services you actually use for payments, analytics, and chat. Treat this as one signal, not proof. Because the loader is reported to fingerprint browsers and filter bots, an empty network tab in your own session does not show that the store is clean.

Step 6: Ask your scanner about databases

Ask whoever supplies your scanner a direct question: does it inspect database content, specifically cms_block and cms_page, or only files on disk? Many teams have never asked, and a clean report from a files-only tool means less than it appears to. If the answer is files only, keep running the queries above on a schedule, and keep them as a standing part of your review.

What to do if you find something

Do not just delete the block. Sansec warns that removing the script does not remove the attacker’s access, so cleanup has to continue.

  • Preserve the evidence. Copy the block’s content, its ID, and its update_time somewhere safe before you change anything. It shows what was loaded and when it was last written.
  • Remove or disable the block, then clear the full-page, block HTML, and configuration caches so that shoppers stop receiving the old content.
  • Find the way in. Look for unknown admin accounts, planted webshells, and unfamiliar processes, and review your server and application logs around the block’s write time.
  • Rotate credentials. Sansec’s advice is to rotate database, administrator, and API integration credentials after removing backdoors.
  • Patch and harden, then test checkout again.
  • Talk to the right people. If card data may have been exposed, speak to your payment provider or acquirer and a qualified security professional about your obligations. This guide is not legal or compliance advice.

Keep the incident note with the dates and what you changed. It is the record that you will want if the same pattern returns.

How to confirm the store is clean

A clean result today is only the first data point, because the same group has been seen rewriting its blocks.

  • Revisit checkout in a fresh private window and check the network tab for unexpected requests.
  • Re-run the Step 1 queries the next day, and again each week for a month, comparing update_time against your saved baseline.
  • Save a baseline list of all CMS block IDs and their update times now, so that a change you did not make stands out.
  • Check server access logs for POST requests to unusual endpoints, which can indicate a backdoor that is still in place.

If a block changes and nobody on the team edited it, treat that as a new incident, not a coincidence.

How to stop it coming back

Patching and periodic scans are necessary, and for this kind of attack they are not sufficient.

  • Patch promptly. Adobe fixed PolyShell in July, and the exposure window is the time between a fix and your update.
  • Limit and protect admin access: remove unused accounts, require two-factor authentication, and restrict who can reach the admin, then rotate credentials after any security work.
  • Add Content Security Policy, and test it first. A policy that is enforced can stop a script from an unlisted domain from loading, but it must be tuned to your payment and third-party scripts, or it can break checkout. Report-only mode shows violations without blocking them.
  • Use admin action logging where you have it. Adobe Commerce Action Logs record changes made by admin users and are not part of Magento Open Source. They will not show writes made directly to the database, for example through a webshell, so they are one layer, not a complete record.
  • Schedule the database query, and if you look after several stores, run it across all of them and keep the results.

Where monitoring fits in a CMS skimmer defence

AuditIQ does not replace the database queries above, and it cannot promise to see a loader that hides from bots. It adds signals around the infection that are easy to miss by hand:

  • Script chain: Script Inventory keeps a ledger of the scripts AuditIQ observes on the pages it crawls, with when each was first and last seen. A new third-party domain stands out, with the caveat that a crawler is exactly what a bot-filtering loader tries to avoid.
  • Browser-side reports: CSP Monitoring collects Content Security Policy violation reports, so when a policy is in place and reporting, a script from an unexpected domain on checkout shows up as a violation.
  • Files: File Integrity flags unexpected changes to tracked files, which is where an uploaded webshell would appear, and Malware Detection matches known malware signatures. Whether a given scan reads database content depends on the tool, so use both alongside Step 1.
  • Configuration: Configuration Tracking records configuration changes, including changes made directly in the database. That helps with skimmers placed in configuration values such as design/head/includes, but CMS blocks are content, not configuration, so it would not have recorded this campaign.
  • One page in detail: Page Explorer lets you open your checkout and see the scripts observed on it and any CSP violations in one place, with the option to compare two dates.

Beyond security, AuditIQ is a 360° eCommerce monitoring platform purpose-built for Magento, Adobe Commerce, and Shopify stores. It continuously monitors every critical layer of a store, from performance, infrastructure, and SEO to security, user experience, configuration, and code quality, from a single, unified dashboard.

Want a second set of eyes on your checkout while you work through the list? Start a free AuditIQ trial and see what is loading on your store today.

Others also read

Frequently asked questions

1. Can a Magento security scan say clean while my store is infected?

Yes, if the scan only reads files. A CMS block is a database row, so a file-only scanner never sees its content, and a loader that hides from bots can look harmless to an automated check of the live page. Ask your scanner supplier whether it inspects cms_block and cms_page.

2. How do I check cms_block and cms_page for malware?

Query both tables for the patterns Sansec recommends, fpCode, se_referrer, and localStorage.getItem, and read the update_time column. Domains are often Base64-encoded, so a domain search alone can miss them. Treat every hit as a lead, then confirm who owns the content.

3. Does patching Magento remove the malware?

No. A patch closes the entry point, but anything already written to the database stays there, and access through a rogue or stolen credential is not affected. After patching, check the database and accounts, and rotate database, admin, and API credentials.

4. What should I do if I find a suspicious CMS block?

Copy its content and update time as evidence, then remove or disable it and clear caches. Look for the way in, rotate credentials, apply security updates, and test checkout again. If card data may have been exposed, talk to your payment provider and a security professional.

5. Is this campaign limited to Magento?

Sansec describes the 953 affected stores as mostly Magento shops, so the campaign is not described as Magento-only. The database-hiding technique itself matters for any platform that stores content in a database, so ask the same question of your own platform.

6. Does Content Security Policy stop a CMS block skimmer?

It can reduce the risk. An enforced policy can stop a script from an unlisted domain from loading, but it must be tested against your payment and third-party scripts, or it can break checkout. Report-only mode shows violations without blocking them, so it helps you see, not stop.

About the author

Ginny Ngo writes from AuditIQ's experience monitoring eCommerce performance, SEO, security, and reliability issues across Magento, Shopify, WooCommerce, and Adobe Commerce stores.

Your Magento security scanner says clean. But the s...