CVE-2026-48356 (PolyShell): unrestricted file upload in Adobe Commerce and Magento
PolyShell lets unauthenticated users drop files into Magento's media folder via the cart REST API. On CISA KEV. Root cause, exposure checks, web-shell hunting and the APSB26-73 fix.
CVE-2026-48356, which Sansec named PolyShell, is an unrestricted file upload bug in Adobe Commerce and Magento Open Source. It was being mass-exploited months before a patch reached most production release lines. CISA added it to the Known Exploited Vulnerabilities catalog on 27 October 2026, but stores were being hit back in March. If you run Magento, assume you need to hunt as well as patch. Magento runs on PHP, so if you haven’t yet, also check the interpreter underneath it against PHP2Shell.
Scope and ethics. This post covers architecture, exposure checks, detection and remediation for stores you own or are authorized to assess. It contains no upload requests, payloads or exploit code. Lab validation means checking versions, web server config and detections on a VM you control, not uploading files to someone else’s shop.
At a glance
| CVE | CVE-2026-48356 (“PolyShell”, Sansec) |
| Severity | CVSS 3.1 9.3 Critical, AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N (NVD). Adobe’s bulletin lists 9.6, .../A:L |
| CWE | CWE-434 Unrestricted Upload of File with Dangerous Type |
| Affected | Adobe Commerce 2.4.9, 2.4.8-p5, 2.4.7-p10, 2.4.6-p15, 2.4.5-p17, 2.4.4-p18 and earlier; Magento Open Source 2.4.9, 2.4.8-p5, 2.4.7-p10, 2.4.6-p15 and earlier; Commerce B2B (see below) |
| Fixed in | 2.4.x-2026-jul builds from APSB26-73 (14 Jul 2026) |
| Exploited? | Yes. Mass exploitation documented by Sansec from 19 Mar 2026. CISA KEV added 27 Oct 2026 (federal due date 10 Nov) |
| Auth | None (reachable through guest cart routes, per Sansec) |
Description: how the bug works
Magento lets merchants define custom options on a product, and one option type is a file: the customer uploads a file (a logo, a print proof) that gets attached to the cart item. Sansec’s analysis says the REST API path for adding cart items accepts that file data and writes the file under pub/media/custom_options/. Because guest carts exist, an attacker doesn’t need an account to reach this path.
Sansec describes three validation gaps working together:
- The option ID isn’t checked against the options the product actually has, so a file can be attached to a product that has no file option.
- The option type isn’t checked, so the upload logic runs no matter what kind of option is referenced.
- File extensions aren’t restricted. The only gate is a check that the content looks like an image header, which a polyglot file (valid image header, PHP inside, hence “PolyShell”) passes.
The result is attacker-controlled files on disk in a directory inside the web root. Whether that becomes RCE depends on your web server config. Sansec lists execution as possible with stock nginx configs from Magento 2.0.0 to 2.2.x, with any non-stock nginx config that sends every .php request to FastCGI, and with Apache before 2.3.5 without php_flag engine 0. Where execution is blocked, Sansec says the uploads can still be used for stored XSS on versions before 2.3.5 or on custom web server configs. That second route is probably why NVD’s vector says UI:R (“a victim must visit a maliciously crafted URL”). GraphQL uses a different code path and Sansec says it isn’t affected.
Impact
- Remote code execution as the PHP-FPM / web server user when an uploaded PHP file can be executed. Sansec observed web shells and
accesson.phpbackdoors dropped across many directories. - Card skimming and redirects. The same operators injected JavaScript loaders into CMS pages and static blocks (
cms_block,cms_page). In October 2026 Sansec tied one long-running loader campaign (953 stores since July 2025) back partly to PolyShell and SessionReaper uploads. - Persistence that survives patching. The loader caches its payload in visitors’
localStorage, and attackers who had shell access may also have database credentials, rogue admin users or other backdoors.
Exposure and exploitation timeline
From Sansec’s advisory timeline:
- 16 Mar 2026: first probing seen. 17 Mar: public warning.
- 19 Mar: first attacks in the wild. 23 Mar: mass scanning.
- 30 Mar: 471 stores compromised in one hour. Sansec reports 79.5% of all stores it monitors were targeted.
- 12 May: Magento 2.4.9 ships with the fix, but no backport to older lines.
- 14 Jul: Adobe ships backports in APSB26-73.
- 27 Oct: CISA KEV.
One thing to be aware of: Adobe’s bulletin still says Adobe “is not aware of any exploits in the wild” for the issues it fixes. That doesn’t match Sansec’s data or CISA’s KEV listing. Go with the exploitation evidence.
Prerequisites: HTTP(S) reachability to the store’s REST API, an unpatched build, no credentials. Turning the upload into code execution additionally needs a web server config that will execute PHP under pub/media/custom_options/.
Identifying affected systems
Run these on stores you administer, from the Magento root:
# 1) Installed version (Open Source vs Commerce shows in the product name)
bin/magento --version
composer show 'magento/product-*' 2>/dev/null | head
# 2) Is the July 2026 security build installed? Look for the -2026-jul suffix
grep -A2 '"name": "magento/product-' composer.lock | grep version
# 3) Do uploads land in the web root, and can PHP run there?
ls -la pub/media/custom_options/ 2>/dev/null
cat pub/media/custom_options/.htaccess 2>/dev/null # Apache: should deny + disable PHP
nginx -T 2>/dev/null | grep -nE 'location.*(media|custom_options|\\.php)'
On nginx, check order: a deny for /media/custom_options/ has to come before (or take precedence over) your generic location ~ \.php$ block. Otherwise the PHP handler wins. Sansec makes this point explicitly. On Apache, check that AccessFileName hasn’t been changed so the shipped .htaccess is quietly ignored.
Fleet view: anything at or below the affected versions in the table, and 2.4.9 GA without the July build, should be treated as exposed. NVD lists 2.4.9 GA as affected. Sansec says 2.4.9 contains the PolyShell fix. Patching to 2.4.9-2026-jul covers you either way.
Safe validation in an isolated lab
You don’t need to upload anything to confirm your posture:
- Stand up an isolated Magento VM (no route to production) at a pre-July build and at the matching
-2026-julbuild. - Run the version checks above and your scanner. Only the old build should be flagged. If neither is, your scanner is reading the wrong thing.
- Place a harmless static text file in
pub/media/custom_options/yourself, from the shell, and request it withcurl -I. With the mitigation below in place you should get 403. That shows the web server rule works without touching the vulnerable code path. - From a test PHP script, make the PHP-FPM user run
idand confirm your EDR/SIEM rule for “web worker spawns shell” fires.
Detection and threat hunting
Sansec’s guidance is to check for web shells even if execution is blocked. Files persist on disk and can become executable after a config change, migration or web server swap.
# Anything in the custom options upload dir that isn't the shipped .htaccess
find pub/media/custom_options/ pub/media/customer_address/ -type f ! -name '.htaccess'
# PHP-ish files anywhere under media (should be none)
find pub/media -type f \( -iname '*.php' -o -iname '*.phtml' -o -iname '*.phar' \)
# Known backdoor name, dropped across var/, app/, pub/, vendor/, setup/, generated/
find /var/www -name 'accesson.php' -type f
Other filenames Sansec observed include index.php (including option-ID-prefixed variants), bypass.phtml, c.php, rce.php, test.php and static.php. It also found web shells disguised as PNG files in pub/media/custom_options/quote/, so don’t filter on extension alone.
Database. Check CMS content for injected loaders (add your table prefix if you use one), and look for admin users you don’t recognize:
SELECT block_id, identifier, update_time FROM cms_block
WHERE content LIKE '%fpCode%' OR content LIKE '%se_referrer%'
OR content LIKE '%localStorage.getItem%';
-- repeat for cms_page; then:
SELECT user_id, username, email, created, logdate FROM admin_user ORDER BY created DESC;
Published IOCs (Sansec): loader and tracker domains lanhd6549tdhse[.]top, jslibrary[.]net, canevaslab[.]com, deepveindrilling[.]com, additionalver[.]com, manulfie[.]click, neswnsssn[.]click. localStorage keys fpCode, 136c1e07507f4a97, 136c1e07507f4a98. A backdoor that answers with a fixed numeric beacon (8194460). Sansec’s advisory also lists 50+ scanning IPs.
Logs. In access logs, look for unusual bursts of POST requests to guest cart item endpoints under /rest/ from IPs that never browse the catalog. Follow-up GETs to anything under /media/custom_options/ are a strong signal, because legitimate visitors almost never request those paths.
Process lineage. php-fpm or www-data spawning sh, bash, curl, wget, python or perl, or writing into /tmp or /dev/shm. Sansec also reports a GSocket backdoor on one victim, so check for unfamiliar long-lived processes and outbound connections.
A store that is fully patched today can still be compromised. Sansec documented a 2.4.7-p10 store with no missing core patches that had a rogue admin account and a backdoor from earlier access.
Remediation
- Install APSB26-73. Upgrade to
2.4.9-2026-jul,2.4.8-2026-jul,2.4.7-2026-jul,2.4.6-2026-jul(Open Source and Commerce), or2.4.5-2026-jul/2.4.4-2026-jul(Commerce). B2B:1.5.3-2026-jul,1.5.2-2026-jul,1.4.2-2026-jul,1.3.4-2026-jul,1.3.3-2026-jul. Adobe Commerce Events goes to 1.21.0. The same bulletin fixes 13 other CVEs. - Also apply APSB25-88 (SessionReaper, CVE-2025-54236) if you haven’t. Sansec sees both used for initial access.
- Hunt, then clean. Remove web shells and backdoors, strip loaders from
cms_block/cms_page, delete rogue admins. - Rotate secrets if you found anything: database, admin, and API integration credentials, plus the crypt key if you suspect
app/etc/env.phpwas read. - Rebuild from a known-good deploy if you can’t establish when the compromise started.
Interim mitigations (if you truly can’t patch today)
These reduce impact but aren’t fixes. Sansec notes that blocking web access doesn’t stop the upload itself:
- Block web access to
pub/media/custom_options/(nginx: adeny alllocation that takes precedence over the PHP location; Apache: confirm the directory’s.htaccessdenies access and disables the PHP engine). - Never let PHP execute under
pub/media/. Pass onlyindex.php,get.php,static.phpand the health check to FastCGI, as Magento’s sample nginx config does, not every*.php. - WAF rule for the affected REST endpoints. Sansec says Akamai added protection on 27 Mar.
- If you don’t sell products with file options, consider disabling REST file uploads for cart items with a module until you upgrade (Kudelski suggests this). Test checkout afterwards.
References
- Adobe security bulletin APSB26-73
- CVE-2026-48356, NVD · CISA KEV catalog
- Sansec: PolyShell advisory and timeline
- Sansec: PolyShell mass attack wave (30 Mar 2026)
- Sansec: deepveindrilling loader campaign, IOCs (24 Oct 2026)
- Kudelski Security: PolyShell
Verify every version against the vendor advisory before acting. Published 07 Nov 2026.