PHPackages                             ioweb-gr/polyshell-disable-file-upload - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ioweb-gr/polyshell-disable-file-upload

ActiveMagento2-module

ioweb-gr/polyshell-disable-file-upload
======================================

Magento 2 module that disables file custom option uploads as a temporary PolyShell mitigation.

1.0.5(today)041↑2607.3%OSL-3.0PHPPHP &gt;=7.4

Since Mar 23Pushed todayCompare

[ Source](https://github.com/ioweb-gr/polyshell-disable-file-upload)[ Packagist](https://packagist.org/packages/ioweb-gr/polyshell-disable-file-upload)[ RSS](/packages/ioweb-gr-polyshell-disable-file-upload/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Ioweb\_PolyshellDisableFileUpload
=================================

[](#ioweb_polyshelldisablefileupload)

Temporary Magento 2 hardening module that mitigates PolyShell-style abuse until the store is upgraded and fully patched.

What it provides
----------------

[](#what-it-provides)

The module includes three practical protections:

- A hard block for file custom option uploads.
- A narrower image-extension-only mitigation inspired by [Mark Shust's workaround](https://github.com/markshust/magento-polyshell-patch).
- A CLI command to scan and optionally clear files from `pub/media/custom_options`.

Admin configuration
-------------------

[](#admin-configuration)

Configuration is available at:

`Stores > Configuration > Security > PolyShell Protection`

### Disable PolyShell Uploads

[](#disable-polyshell-uploads)

When enabled, the module hard-blocks file custom option uploads:

- REST and API-driven file custom option payloads are rejected.
- Standard Magento file custom option validation is rejected too.

Use this if the store does not rely on file custom options at all.

### Allow Only Image Extensions

[](#allow-only-image-extensions)

When enabled, the module applies an image-only extension allowlist to the relevant Magento image upload path:

- rejects non-image filename extensions during image content validation
- restricts the uploader to `jpg`, `jpeg`, `gif`, and `png`

Use this if you want a narrower mitigation and still need image-only behavior.

Default configuration
---------------------

[](#default-configuration)

For safety, both protections default to `Yes`.

CLI command
-----------

[](#cli-command)

The module adds this command:

```
bin/magento ioweb:polyshell:custom-options:scan
```

Behavior:

- Dry-run by default: lists files under `pub/media/custom_options` that would be removed.
- Deletes only when `--force` is supplied.
- Ignores `.htaccess` and `.gitignore`.

Example:

```
bin/magento ioweb:polyshell:custom-options:scan --force
```

Installation
------------

[](#installation)

Add the repository to your project and require the package:

```
composer config repositories.ioweb-polyshell-disable-file-upload vcs https://github.com/ioweb-gr/polyshell-disable-file-upload.git
composer require ioweb-gr/polyshell-disable-file-upload
bin/magento module:enable Ioweb_PolyshellDisableFileUpload
bin/magento setup:upgrade
bin/magento cache:flush
```

Notes
-----

[](#notes)

- This module is a temporary mitigation, not a replacement for upgrading Magento.
- Keep web server protections on `/media/custom_options/` in place even with this module installed.
- If your store genuinely uses file custom options, test carefully before enabling the hard block mode.

###  Health Score

39

—

LowBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f73204298dc8973a5852ea2779243be0cee39f44cfe8e881d9c75e9e9025af35?d=identicon)[ioweb-gr](/maintainers/ioweb-gr)

---

Top Contributors

[![ioweb-gr](https://avatars.githubusercontent.com/u/20220341?v=4)](https://github.com/ioweb-gr "ioweb-gr (15 commits)")

### Embed Badge

![Health badge](/badges/ioweb-gr-polyshell-disable-file-upload/health.svg)

```
[![Health](https://phpackages.com/badges/ioweb-gr-polyshell-disable-file-upload/health.svg)](https://phpackages.com/packages/ioweb-gr-polyshell-disable-file-upload)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
