Magento Open Source Unauthenticated PolyShell File Upload (CVE-2026-48356)
Published: 2026-11-27 • Researcher: abraxas / Abraxas Labs; Adobe (APSB26-73), Sansec (PolyShell research)
Exploitation signals
Confirmed exploited in the wild. Added to CISA KEV 2026-10-27. Federal remediation deadline 2026-11-10.
EPSS 7.9% · 95th percentile
- Severity
- Critical
- CVE
- CVE-2026-48356
- Category
- web
- Affected product
- Magento Open Source / Adobe Commerce
- Affected versions
- NVD range: 1.6.0 before 1.21.0; researcher lab and write-up: all versions through 2.4.8-p5 (inclusive)
- Disclosed
- 2026-11-27
- Patch status
- Patched
Tags
References
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-27 |
| Last Updated | 2026-10-28 |
| Author / Researcher | abraxas / Abraxas Labs; Adobe (APSB26-73), Sansec (PolyShell research) |
| CVE / Advisory | CVE-2026-48356 |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.3 (CVSSv3.1, CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N) |
| Status | PoC (upload confirmed; remote execution not demonstrated) |
| Tags | magento, adobe-commerce, unrestricted-file-upload, CWE-434, polyglot, unauthenticated, guest-cart, REST-API, webshell |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Magento Open Source / Adobe Commerce |
| Versions Affected | NVD range: 1.6.0 before 1.21.0; researcher lab and write-up: all versions through 2.4.8-p5 (inclusive) |
| Language / Platform | PHP / Magento 2 (lab pinned to 2.4.8-p5, PHP 8.3, nginx); Python 3 exploit client |
| Authentication Required | No (guest cart REST API) |
| Network Access Required | Yes (target HTTP/REST reachable) |
Summary
CVE-2026-48356 is an unauthenticated unrestricted file upload in Magento Open Source. A guest cart item can carry a custom option file info field whose declared name ends in .php while its content is a GIF89a polyglot. The image validator accepts it because the bytes begin with a valid GIF header and pass the punctuation checks, but the file processor keeps the caller-supplied extension. The file is written under pub/media/custom_options/quote/ and can later be requested from the web root, giving an unauthenticated attacker a PHP webshell and code execution as the Magento user. The researcher’s lab oracle is the uploaded filename echoed in the add-to-cart JSON, not command execution.
Vulnerability Details
Root Cause
The guest-cart REST custom-option file path performs insufficient validation of uploaded custom-option files. ImageContentValidator checks getimagesizefromstring plus punctuation and MIME, but ImageProcessor::getFileName preserves the caller-supplied filename extension. No option_id or option-type restriction is enforced on that REST path, so a valid GIF image with a trailing PHP short-echo and a .php name satisfies the image check and is stored with the dangerous extension.
Attack Vector
- POST /rest/default/V1/guest-carts to create an unauthenticated guest cart and obtain its cart ID.
- POST /rest/default/V1/guest-carts/{cartId}/items with a cart item containing product_option.extension_attributes.custom_options, a file_info object whose base64_encoded_data is a GIF89a polyglot and whose name ends in .php.
- The REST response echoes the stored filename, showing the .php file was accepted under pub/media/custom_options/quote/.
- Request the written file over HTTP to execute the embedded PHP, assuming the media path is web-served.
Impact
Unauthenticated arbitrary file upload of a PHP-capable file into the Magento media tree. When requested through the web server this yields remote code execution as the Magento/PHP user, with high confidentiality and integrity impact and potential account or session takeover. The advisory describes scope change and elevated access.
Environment / Lab Setup
OS: Linux with Docker and Docker Compose
Target: Magento Open Source 2.4.8-p5 without APSB26-73, on 127.0.0.1:18096
(shinsenter/magento:php8.3-nginx + mysql:8.0 + opensearch:2.11.1)
Attacker: Python 3 clients (lab/poc.py or the top-level runner)
Tools: docker compose, python3, bashSetup Steps
| |
The compose stack binds the shop to loopback only. setup-magento.sh installs Magento 2.4.8-p5 from the Mage-OS mirror, and seed-product.sh creates the simple product lab-sku so the guest-cart REST call has a valid SKU.
Proof of Concept
Step-by-Step Reproduction
Start the loopback lab — Magento 2.4.8-p5 with MySQL and OpenSearch, reachable only on 127.0.0.1:18096.
Shell script1python3 CVE-2026-48356-Abraxas-Labs.pyConfirm the catalog fixture — the client queries GraphQL for lab-sku.
Shell script1python3 lab/poc.py http://127.0.0.1:18096Create a guest cart — unauthenticated POST to /rest/default/V1/guest-carts returns the cart ID.
Upload the polyglot — POST the cart item with a GIF89a plus PHP short-echo payload named GHSA48356-WITNESS.php.
Read the oracle — the add-to-cart JSON echoes GHSA48356-WITNESS.php, proving the .php file was accepted.
Exploit Code
See lab/poc.py for the upload client, CVE-2026-48356-Abraxas-Labs.py for the runner, and lab/docker-compose.yml plus lab/setup-magento.sh for the pinned lab.
| |
Expected Output
| |
Detection & Indicators of Compromise
- New .php or other executable files under pub/media/custom_options/quote/ or the wider media tree.
- POST requests to /rest/default/V1/guest-carts/{cartId}/items whose JSON body contains file_info, a base64 blob beginning with GIF89a, and a name ending in .php.
- Guest-cart traffic with custom_options file uploads from unauthenticated clients.
- Requests for media files whose content begins with GIF89a but contains PHP tags.
- Magento / Adobe Commerce version at or below 2.4.8-p5 without APSB26-73.
SIEM / IDS Rule (example):
alert http any any -> any any (msg:"CVE-2026-48356 Magento PolyShell guest-cart upload"; \
content:"/rest/default/V1/guest-carts"; http_uri; \
content:"file_info"; http_client_body; \
content:"base64_encoded_data"; http_client_body; \
pcre:"/\"name\"\s*:\s*\"[^\"]+\.(php|phtml)\"/i"; sid:9483561;)Remediation
| Action | Detail |
|---|---|
| Patch | Apply APSB26-73 / 2.4.8-2026-jul or upgrade to a later Magento Open Source / Adobe Commerce release. |
| Workaround | Restrict or disable guest-cart custom-option file uploads; block .php/.phtml uploads at the WAF and deny script execution under pub/media. |
| Config Hardening | Serve pub/media with a handler that never executes PHP, monitor the media tree for script files, and keep Adobe Commerce security patches current. |
References
Notes
Auto-prepared 2026-11-27 from the watchlist record. Review verdict: genuine, non-malicious exploit research. The client performs the actual unauthenticated guest-cart upload and proves acceptance through the filename echoed in the response; it does not include eval, base64, system or reverse-shell payloads, and the lab binds to 127.0.0.1 only. Licensed AGPL-3.0 (upstream-LICENSE.txt retained); the header image was not copied. Main limitation: the lab oracle is the uploaded filename, not command execution, and the Magento 2.4.8-p5 install downloads from the Mage-OS mirror, so the stack is heavy. No exploit code was executed during archive preparation.
| |