PolyShell is one of the most serious vulnerabilities ever found in Magento 2. It lets anyone, without logging in, upload malicious files to the server of a Magento Open Source or Adobe Commerce store. It has been exploited at scale since March 2026. If your store has not been updated yet, this article explains the risk and what to do right now.
What is PolyShell (APSB25-94)?
The vulnerability was disclosed by security firm Sansec on 17 March 2026. It is tracked as CVE-2026-48356 and rated critical. Adobe’s first fix, only in the 2.4.9-alpha3 pre-release, is associated with bulletin APSB25-94.
The problem lies in the REST API for guest carts. When adding a product to the cart, a file can be attached as a “custom option”. Magento does not check that the product actually has that option, and does not restrict the file extension. The only check is whether the file “looks like” an image.
An attacker can therefore upload a polyglot file: it starts as a valid image but contains PHP code. The file is saved under pub/media/custom_options/. That is where the name comes from: a polyglot file that becomes a webshell.
What is the impact?
The upload works on practically every store. What happens next depends on the web server configuration:
- Remote code execution: if the folder is reachable and PHP runs there, the attacker controls the server. They can steal customer data, install card skimmers or deface the store.
- Stored XSS: if the folder is reachable but PHP is blocked, the file can be used to attack administrators and customers.
- Latent risk: even with access blocked, the malicious file stays on disk. A later configuration change can activate it.
According to Sansec, the first attacks appeared on 19 March 2026, followed by waves of automated attacks against the large majority of the stores it monitors. Backdoors such as accesson.php were found spread across many folders, along with malicious JavaScript injected into CMS pages and blocks.
Which versions are affected?
All versions of Magento Open Source and Adobe Commerce up to 2.4.9-alpha2. The vulnerable code has existed since the first Magento 2 release.
Adobe released version 2.4.9 with the fix in May 2026. On 14 July 2026 it also published security patches for the supported 2.4.x lines, in bulletin APSB26-73.
What to do now
- Update: install version 2.4.9 or the July 2026 security patch (APSB26-73) for your 2.4.x line. Unsupported versions get no fix: it is time to plan the upgrade.
- Block the folder on the web server: deny all access to
pub/media/custom_options/. In Nginx, the rule must come before the block that handles.phpfiles. In Apache, check that the folder’s.htaccessexists and blocks both access and PHP execution. - Use a WAF: blocking the folder does not stop the upload. Only a web application firewall that filters the API request stops the attack at the door.
- Look for signs of compromise: any non-image file in
pub/media/custom_options/,accesson.phpfiles anywhere in the project, and unknown scripts in CMS pages and blocks. - If you find something: treat the store as compromised. Remove the backdoors, review admin users and change all passwords and API keys.
Need help?
Waterstone specialises in Magento. We can check whether your store is exposed, apply the fix, harden the server configuration and look for signs of compromise. Get in touch and protect your store today.
