Download the PHP package mage2kishan/module-malware-scanner without Composer

On this page you can find all versions of the php package mage2kishan/module-malware-scanner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-malware-scanner

Magento 2 Malware Scanner: Real-Time Upload Guards, File Scanning, and Auto-Quarantine (Hyva + Luma)

Magento 2.4.4 - 2.4.8 PHP 8.1 - 8.4 Hyva + Luma Live Demo & Details Packagist Upwork Top Rated Plus Website

Protect your Magento 2 store from malware, webshells, and file-upload attacks. Panth Malware Scanner runs 11 inline guard plugins that block PolyShell payloads, polyglot files, and PHP injection attempts before they touch disk, then runs a nightly recursive scan of your codebase and auto-quarantines critical findings in writable upload zones.

Product page: kishansavaliya.com/magento-2-malware-scanner.html


Quick Answer

What is Panth Malware Scanner? It is a Magento 2 security extension that combines 11 real-time upload and request guards with a signature-based on-disk scanner, auto-quarantine, and email alerts, so malicious files are stopped at the framework layer and anything that slips through is caught in the next scan.

What does it add to my store?

Which themes are supported? The module works on Hyva and Luma storefronts. It is a security layer with no storefront UI of its own.

What does it need? Magento 2.4.4 to 2.4.8, PHP 8.1 to 8.4, and the free mage2kishan/module-core package.


Live Proof: PolyShell Attacks Blocked on Our Own Stores

The screenshots below were captured on a production Magento 2.4.8 store running Panth Malware Scanner during the active PolyShell (APSB25-94) exploitation wave that started March 17, 2026. Every row is a real attacker request that hit the store and was shut down at the framework layer, before any webshell executed.

What you are seeing: 807 blocked malicious requests across 41 pages. Attackers probed /media/custom_options/quote/*.php, POST bodies starting with <?php, and base64 GIF-header polyglot payloads. Every one was blocked at the controller layer before the payload reached disk.

Earlier snapshot - 286 blocked requests. Same attack shapes: PolyShell polyglot uploads, REST API base64 webshell uploads, customer attribute tmpfile abuse. Each match records the source IP, exact URI, matched signature rule, and severity.


StyleSmuggler: the September 2026 Magento Zero-Day

On 5 September 2026 Sansec disclosed StyleSmuggler, an unauthenticated remote code execution flaw that affects every current Magento Open Source and Adobe Commerce release, including fully patched 2.4.6-p15 and 2.4.9 stores. The attacker sends a crafted request (seen in the wild as POST /graphql?styles[...]= and POST /paypal/transparent/response/?<?=eval(base64_decode(...))), Magento writes the payload into a file it owns (a failure report under var/report/, marked X_TRACE_), and the code runs the moment Magento renders its own "Payment Transaction Failed Reminder" email. Nobody has to open the email. Adobe had not published a patch at the time of writing. Reference: sansec.io/research/stylesmuggler.

Version 1.2.0 adds three layers against it:

Layer What it does
Request block The GraphQL, storefront and REST guards decode the request URI (up to three levels of URL encoding) and reject any request whose query string carries a PHP open tag, eval(, base64_decode(, a base64-encoded PHP tag, the X_TRACE_ marker, or a styles[ parameter combined with any of those. Any styles[ parameter on /graphql is blocked outright, and a request carrying an X-TRACE-<hex> header (the dropper's execution trigger) is blocked on every route. GraphQL requests are checked at the controller entry point, before query parsing, content-type validation and the GraphQL cache, and a match gets an HTTP 400 JSON error; storefront requests get a 404, REST requests a 400. Every block is written to the Blocked Requests grid under graphql_entry, request_payload, graphql or rest_api.
Poison detection The scanner flags failure reports under var/report/ that contain the X_TRACE_ marker or a PHP open tag, and any file in the tree that references the published command-and-control domain or attacker IPs. var/report is already inside the default scan paths.
Implant detection Signatures for the self-deleting dropper stub, the implant file names (kworker-linux*, gvfsd-user, fc-cache inside the Magento tree), the crontab persistence lines, the /tmp/.kw_*, /tmp/.cache_*, /tmp/.fc_* drop paths, and the three published implant SHA-256 hashes (new hash signature type).

What the module cannot do: it cannot patch Magento. Until Adobe ships a fix, also apply the server-side hardening Sansec recommends: disable proc_open in PHP's disable_functions, mount /tmp, /var/tmp and /dev/shm with noexec, and disable GraphQL if the store does not use it.

Check a store right now:

Any STYLESMUGGLER_* finding, any x_trace_ hit, or a [kworker/u:8:0] process owned by the web user means the server is compromised. Rotate every credential and rebuild from a clean deploy.


Need Custom Magento 2 Development?

Get a free quote for your project in 24 hours for custom modules, security hardening, malware removal, Hyva themes, performance work, and Adobe Commerce Cloud.

Get a Free Quote

### Kishan Savaliya **Top Rated Plus on Upwork** [![Hire on Upwork](https://img.shields.io/badge/Hire%20on%20Upwork-Top%20Rated%20Plus-14a800?style=for-the-badge&logo=upwork&logoColor=white)](https://www.upwork.com/freelancers/~016dd1767321100e21) 100% Job Success • 10+ Years Magento Experience Adobe Certified • Security Specialist ### Panth Infotech Agency **Magento Development Team** [![Visit Agency](https://img.shields.io/badge/Visit%20Agency-Panth%20Infotech-14a800?style=for-the-badge&logo=upwork&logoColor=white)](https://www.upwork.com/agencies/1881421506131960778/) Malware Removal • Security Audits • Hardening Performance • SEO • Adobe Commerce Cloud

Visit our website: kishansavaliya.com  |  Get a quote: kishansavaliya.com/get-quote


Table of Contents


Who Is It For


Key Features

Real-Time Upload and Request Guards

Signature-Based Filesystem Scanner

Automatic Quarantine

Admin Dashboard and Grids

Scheduled Scans and Email Alerts

Extension Allowlist for Customer Uploads

Quality and Compatibility


Active Protection Layers

Guard What it covers
Upload Guard Every Magento upload channel via Magento\Framework\File\Uploader
REST API Guard POST/PUT/PATCH request bodies in the webapi_rest area
GraphQL Guard GraphQL mutation bodies and variable JSON
Custom Option Guard Product custom-option file uploads at the validator
Cart Custom Option Guard file_content / base64_encoded_data keys at add-to-cart time
Customer File Guard saveTemporaryFile and moveTemporaryFile for customer address uploads
Customer Attribute Guard Frontend upload controllers for customer attribute files
Image Content Guard Admin catalog image uploads with strict extension allowlist
Media Path Guard Executable extension requests in writable media dirs via pub/get.php
Frontend Path Guard Known PolyShell victim paths at the FrontController level
Webapi File Guard REST service-contract file uploads via the Webapi uploader class

All 11 guards are registered via etc/*/di.xml. They are always active while the module is enabled and cannot be toggled off from the admin. The Active Protections panel in Stores Configuration is read-only and shows their status.


Signature Types

Type Description Example
regex PCRE pattern matched against file contents eval\s*\(\s*base64_decode\s*\(
literal Exact byte sequence search PolyShell magic header bytes
hash SHA-256 of the whole file matches a published implant hash StyleSmuggler implants
filename Matches file basename c99.php, r57.php, shell.php
pathglob Glob pattern against full relative path pub/media/*.php

Each signature has a severity (critical, high, medium, low) and a description shown in the findings grid. You can add your own signatures via etc/panth_malware_signatures.xml in a custom module.


Compatibility

Requirement Versions Supported
Magento Open Source 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8
Adobe Commerce 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8
Adobe Commerce Cloud 2.4.4 to 2.4.8
PHP 8.1.x, 8.2.x, 8.3.x, 8.4.x
MySQL 8.0+
MariaDB 10.4+
Hyva Theme 1.0+ (compatible, no storefront UI)
Luma Theme Native support
Required Dependency mage2kishan/module-core (free)

Installation

Composer Installation (Recommended)

Manual Installation via ZIP

  1. Download the latest release from Packagist or from the product page.
  2. Extract it to app/code/Panth/MalwareScanner/ in your Magento install.
  3. Make sure Panth_Core is installed too (required dependency).
  4. Run the commands above starting from bin/magento module:enable.

Verify Installation

After install, open:


Configuration

Go to Stores -> Configuration -> Panth Extensions -> Malware Scanner.

Setting Group Default Description
Enable Module General Yes Master toggle for the module. Disabling stops all guards and scans.
Max File Size to Scan (KB) General 2048 Files larger than this are skipped during disk scans.
Scan Paths General pub/media, app/code, vendor, var, generated, lib, bin, setup, pub/static Paths to scan, one per line, relative to Magento root.
Exclude Paths General var/cache, var/log, var/page_cache, generated/code Paths to skip, one per line.
File Extensions to Scan General php, phtml, phar, php3-7, phps, inc, htaccess, jpg, jpeg, png, gif, svg, html, htm, js Comma-separated list.
Enforce Extension Allowlist on Customer Uploads General Yes Rejects customer-facing uploads whose extension is not on the allowlist, regardless of content.
Customer Upload Extension Allowlist General jpg,jpeg,png,gif,webp,bmp,pdf,doc,docx,xls,xlsx Comma-separated. Only shown when the enforce toggle is on.
Enable Cron Scan Scheduled Scan Yes Enables the nightly background scan.
Cron Expression Scheduled Scan 0 3 * * * When to run the scheduled scan. Default is daily at 03:00.
Auto-Quarantine Critical Findings Active Protection Yes Moves critical-severity files inside Quarantine Zones to var/panth_malware_quarantine/ automatically.
Quarantine Zones Active Protection pub/media, var/import, var/export, var/tmp, var/importexport Only files in these directories can be auto-quarantined.
Purge Non-Allowlisted Customer Uploads Active Protection No Optional cron that deletes existing files in customer upload dirs whose extension is not on the allowlist. Default off.
Extra Allowlist Paths Active Protection (empty) Path prefixes to skip during scanning. Extends the built-in vendor allowlist.
Active Protections panel Active Protection (read-only) Shows all 11 guard plugins wired through DI. Informational only.
Send Email on Detection Email Notifications Yes Send an alert when a scan or guard triggers at or above the severity threshold.
Recipient Emails Email Notifications store owner Comma-separated recipients, one per line.
Minimum Severity for Email Email Notifications high Critical, high, medium, or low.
Sender Email Notifications General Contact Which store email identity to send alerts from.

How It Works

  1. A request comes in (file upload, REST call, GraphQL mutation, add-to-cart with custom option).
  2. The relevant guard plugin inspects the payload before it reaches disk. If a match is found, the request is rejected, a log entry is written to panth_malware_blocked_request, and an HTTP error is returned.
  3. If the file reaches disk (for example a file uploaded before the module was installed), the nightly cron scanner walks the configured scan paths, checks each file against the signature catalog, and writes findings to panth_malware_scan_result.
  4. Critical findings inside Quarantine Zones are moved to var/panth_malware_quarantine/ with mode 0600.
  5. If new findings are at or above the email threshold, a notification is sent to the configured recipients.
  6. Admins review findings in the Scan Findings grid and blocked requests in the Blocked Requests grid. Mass actions let you quarantine, delete permanently, or mark as ignored.

Admin Dashboard

Open Admin -> Panth Infotech -> Malware Scanner.

The admin area has four pages:


Scheduled Scans

The module registers a Magento cron job that honours the Cron Expression setting. The default schedule runs every night at 03:00 server time. You can also trigger an ad-hoc scan from the admin or run it from the command line:

This command works in CI pipelines and outputs a progress summary to stdout.


Quarantine

When a critical finding is detected inside a configured Quarantine Zone (for example pub/media or var/import), the scanner moves the file to var/panth_malware_quarantine/ with mode 0600. The file is not deleted. You can review it, restore it if it is a false positive, or delete it permanently from the findings grid.

Files outside writable zones (app/code, vendor, lib, generated, bin, setup, pub/static) are flagged only and never touched automatically, so a guard or scanner bug can never break your codebase.

Two-Tier Removal from the Findings Grid

Action What happens When to use
Quarantine and Delete File is moved to var/panth_malware_quarantine/. Original path is removed. Evidence is preserved. Default handling for any suspicious finding.
Delete Permanently File is hard-unlinked. No recovery possible. After confirming malicious and when you no longer need the file for evidence.

Both actions are available as mass actions in the Findings grid. Permanent delete requires confirmation.


Email Notifications

When a scheduled scan finishes with findings at or above the configured severity threshold, an email is sent to every address in Recipient Emails. The email includes:


FAQ

Does this block StyleSmuggler?

It blocks the request shapes the attack is known to use (PHP tags, eval(, base64_decode( or an X_TRACE_ marker in the query string, including inside a styles[] parameter, on GraphQL, storefront and REST routes), it flags the poisoned failure reports and logs the exploit leaves behind, and it recognises the implant by name, by persistence lines and by hash. It cannot fix the vulnerable Magento code; apply Adobe's patch when it is published and the server hardening listed above in the meantime.

Does this block PolyShell attacks?

Yes. The cart custom option guard, custom option guard, and upload guard specifically target the PolyShell (APSB25-94) attack chain. Every blocked request is logged with the exact matched signature so you can see what was blocked and when.

Does it prevent attacks or only detect them?

Both. The 11 guard plugins run inline and block uploads and requests before they reach disk. The cron scanner detects anything that was on disk before the module was installed or that bypassed the guards.

Will scanning slow down my store?

No. Scans run in the background via cron. Guards are fail-open, meaning any internal error logs a warning and lets the request through, so a guard bug cannot take the store offline. File scanning uses streaming reads and skips noise directories.

Can I add my own signatures?

Yes. Add an etc/panth_malware_signatures.xml file in a custom module. Signatures declared there are merged into the main catalog at runtime.

What happens to quarantined files?

They are moved to var/panth_malware_quarantine/ with full path metadata. Nothing is deleted automatically during quarantine. Review and delete from the findings grid once you have confirmed the file is malicious.

Does it work on Adobe Commerce Cloud?

Yes. The module is compatible with Adobe Commerce Cloud. Set the quarantine path to a writable mount in your configuration.

Can I disable individual guards?

No. Guards are registered via DI and are always active while the module is enabled. The Active Protections panel in admin configuration shows their status but is read-only. If you need to remove a guard, that requires a code change.

Does the extension allowlist break legitimate customer uploads?

No, as long as you keep the default allowlist (jpg, jpeg, png, gif, webp, bmp, pdf, doc, docx, xls, xlsx). Only add extensions your store genuinely needs. Never add txt, html, svg, or php variants.

Does Panth Malware Scanner need Panth Core?

Yes. mage2kishan/module-core is a free required dependency that Composer installs for you automatically.


Support

Channel Contact
Product Page kishansavaliya.com/magento-2-malware-scanner.html
Email [email protected]
Website kishansavaliya.com
WhatsApp +91 84012 70422
GitHub Issues github.com/mage2sk/module-malware-scanner/issues
Upwork (Top Rated Plus) Hire Kishan Savaliya
Upwork Agency Panth Infotech

Response time: 1-2 business days.

Need Custom Magento Development?

Looking for malware removal, post-breach cleanup, security hardening, custom module development, or Hyva theme work? Get a free quote in 24 hours:

Get a Free Quote

Hire on Upwork    Visit Agency    View Product Page


About Panth Infotech

Built and maintained by Kishan Savaliya (kishansavaliya.com), a Top Rated Plus Magento developer on Upwork with 10+ years of eCommerce experience.

Panth Infotech is a Magento 2 development agency that builds high quality, security focused extensions and themes for both Hyva and Luma storefronts. The extension suite covers security, SEO, performance, checkout, product presentation, customer engagement, and store management, with each module built to MEQP standards and tested across Magento 2.4.4 to 2.4.8.

Browse the full extension catalog on our Magento extensions page or on Packagist.


Quick Links

Resource Link
Product Page magento-2-malware-scanner.html
Packagist mage2kishan/module-malware-scanner
GitHub mage2sk/module-malware-scanner
Website kishansavaliya.com
Free Quote kishansavaliya.com/get-quote
Upwork (Top Rated Plus) Hire Kishan Savaliya
Upwork Agency Panth Infotech
Email [email protected]
WhatsApp +91 84012 70422

Ready to protect your Magento 2 store from malware and webshell attacks?
See Malware Scanner


SEO Keywords: magento 2 malware scanner, magento 2 security extension, magento 2 webshell protection, polyshell magento, magento file integrity monitor, magento malware detection, magento 2 antivirus, magento upload guard, magento rest api security, magento graphql security, magento auto quarantine, magento admin security grid, magento scheduled security scan, magento custom option upload protection, magento polyglot file detection, magento eval backdoor detection, magento magecart scanner, magento php object injection, magento 2.4.8 security, magento 2 apsb25-94, magento customer upload allowlist, magento 2 file scan extension, magento cron security scan, magento quarantine malware, magento signature scanner, magento regex malware signatures, magento blocked requests log, magento admin malware dashboard, magento blocked request audit, panth malware scanner, panth infotech security, hire magento security expert, top rated plus magento freelancer, kishan savaliya magento, mage2kishan, mage2sk


All versions of module-malware-scanner with dependencies

PHP Build Version
Package Version
Requires php Version ~8.1.0||~8.2.0||~8.3.0||~8.4.0
mage2kishan/module-core Version ^1.0
magento/framework Version ^103.0
magento/module-backend Version ^102.0
magento/module-ui Version ^101.2
magento/module-cron Version ^100.4
magento/module-config Version ^101.2
magento/module-store Version ^101.1
magento/module-catalog Version ^104.0
magento/module-webapi Version ^100.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mage2kishan/module-malware-scanner contains the following files

Loading the files please wait ...