Skip to content

CVE-2026-48356: Adobe Commerce & Magento Open Source Unrestricted Polyglot File Upload Remote Code Execution (CISA KEV / PolyShell)

Density:
C-Level Executive Briefing CVE-2026-48356 CRITICAL SCORE 97/100

Critical remote code execution vulnerability officially inscribed into the CISA Known Exploited Vulnerabilities (KEV) Catalog on October 27, 2026, with a mandatory federal remediation deadline of November 17, 2026. Designated CVE-2026-48356 and tracked by cybersecurity researchers under the campaign name 'PolyShell', the vulnerability resides in the media attachment handling of custom options within Adobe Commerce and Magento Open Source. Unauthenticated remote attackers exploiting exposed GraphQL or REST cart endpoints can upload polyglot image files that satisfy superficial header checks (GIF89a / JPEG SOI markers) while encapsulating active PHP payloads. Because uploaded media files are deposited in web-accessible storage directories without executable script restrictions, adversaries invoke the file directly to execute arbitrary code, plant stealthy payment card skimmers, and exfiltrate customer databases.

HYBRID

HERMES THREAT SCORE & E-COMMERCE PAYMENT PIPELINE COMPROMISE EVALUATION

Target: Adobe Commerce Custom Options Media Upload Controller & REST/GraphQL API
Confidence: 99%
97 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 20 / 20
Threat Activity 20 / 20
Weaponization 20 / 20
Exposure 19 / 20
Prevalence 19 / 20
Impact 20 / 20
Exploit Maturity 20 / 20
Attack Chain Potential 20 / 20

In Adobe Commerce and Magento Open Source, products can define custom customizable options, including file attachments (such as logos for branded merchandise). When a guest or authenticated user adds a product with a custom file option to their cart, the request is processed by the quote item attachment pipeline via GraphQL (addSimpleProductsToCart) or REST (POST /rest/V1/guest-carts/:cartId/items).

flowchart TD
A["Attacker (Unauthenticated Guest Shopper)"] -->|"1. Initiates guest cart on /rest/V1/guest-carts"| B["Adobe Commerce Storefront"]
B -->|"2. Sends multipart POST with polyglot GIF/PHP file"| C["Custom Option Upload Handler: FileProcessor.php"]
C -->|"3. Verifies magic bytes: passes getimagesize() check"| D["Bypasses MIME validation: Content-Type: image/gif"]
D -->|"4. Writes file to pub/media/custom_options/quote/..."| E["Web-Accessible Media Storage Directory"]
A -->|"5. Directly requests https://target.com/media/custom_options/.../poly.php"| F["Web Server (Nginx / Apache PHP-FPM)"]
F -->|"6. PHP-FPM executes embedded <?php ... ?> tags"| G["Arbitrary Code Execution as www-data"]
G -->|"7. Injects Magecart skimmer into checkout JavaScript"| H["Credit Card & Customer PII Theft"]

The vulnerability stems from improper validation inside Magento\Catalog\Model\Product\Option\Type\File\Processor. The component relied exclusively on PHPโ€™s getimagesize() and extension matching against an allowlist that failed to properly sanitize double extensions or enforce execution blocking in the destination directory:

/* Vulnerable file validation logic in FileProcessor.php */
public function validateUploadedFile(array $fileInfo)
{
// Insufficient check: only inspects first 12 bytes for image headers
$imageDimensions = @getimagesize($fileInfo['tmp_name']);
if (!$imageDimensions && !in_array($fileInfo['type'], $this->allowedMimeTypes)) {
throw new LocalizedException(__('Invalid image file uploaded.'));
}
// Flawed filename sanitization preserves secondary extensions
$fileName = $fileInfo['name']; // e.g., "avatar.php.gif" or "receipt.gif"
$targetPath = $this->mediaDirectory->getAbsolutePath('custom_options/quote/') . $fileName;
// File moved to publicly accessible web root without stripping executable permissions
$this->uploader->save($targetPath);
return $targetPath;
}

By forging a polyglot file starting with GIF89a header bytes followed by compressed image metadata and embedded PHP tags (GIF89a<?php system($_GET['cmd']); ?>), an attacker simultaneously satisfies getimagesize() and deposits an executable script directly inside the document root (pub/media/).


Threat actors executing the โ€œPolyShellโ€ campaign deploy an automated 4-stage kill chain:

  1. Guest Cart Initialization: The attacker sends a request to /rest/V1/guest-carts to obtain a public cartId without requiring user registration.
  2. Polyglot Attachment Upload: A multipart HTTP request uploads the polyglot file via the quote custom option endpoint. The response returns the relative storage path inside pub/media/custom_options/quote/.
  3. Webshell Invocation: The attacker accesses the file over HTTP. If the web server configuration lacks explicit directives forbidding PHP execution inside /pub/media/, the PHP-FPM daemon processes the payload, providing an interactive command execution interface.
  4. Magecart Deployment & Database Exfiltration: Using shell access, attackers modify CMS layout blocks and core checkout JavaScript (core.bundle.js), inserting obfuscated event listeners that stream entered credit card numbers, CVVs, and billing addresses to offshore drop servers.

Security Operations Centers (SOC) must inspect web server access logs for anomalous requests into pub/media/custom_options/ and scan media storage for PHP tags embedded within image files.

title: Adobe Commerce PolyShell File Upload Exploitation Attempt
id: c7e19048-4835-4c92-a128-cve202648356
status: critical
description: Detects HTTP requests uploading or executing polyglot PHP scripts inside Adobe Commerce / Magento custom options media directories indicative of CVE-2026-48356 exploitation.
references:
- https://helpx.adobe.com/security/products/magento/apsb26-73.html
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog
author: Hermes Codex Cyber Defense Team
date: 2026-11-02
logsource:
category: webserver
product: adobe_commerce
detection:
selection_upload:
cs-method: 'POST'
cs-uri-stem|contains:
- '/rest/V1/guest-carts/'
- '/graphql'
cs-uri-query|contains:
- 'custom_options'
selection_execution:
cs-method: 'GET'
cs-uri-stem|contains:
- '/pub/media/custom_options/'
- '/media/custom_options/'
cs-uri-stem|endswith:
- '.php'
- '.phtml'
- '.php5'
- '.phar'
condition: selection_upload or selection_execution
falsepositives:
- Legitimate admin image downloads (differentiated by HTTP GET requesting non-executable extensions)
level: critical
tags:
- attack.initial_access
- attack.t1190
- attack.persistence
- attack.t1505.003

  1. Apply Vendor Patch (APSB26-73): Upgrade Adobe Commerce or Magento Open Source immediately to the designated security release:
    • 2.4.9-p1 (for 2.4.9)
    • 2.4.8-p6 (for 2.4.8)
    • 2.4.7-p11 (for 2.4.7)
    • 2.4.6-p16 (for 2.4.6)
    • 2.4.5-p18 (for 2.4.5)
    • 2.4.4-p19 (for 2.4.4)
  2. Harden Web Server Configuration: In Nginx, explicitly disable PHP execution within all media and upload directories:
    location /pub/media/ {
    location ~ \.(php|phtml|phar)$ {
    deny all;
    }
    try_files $uri $uri/ /get.php$is_args$args;
    }
  3. Audit CMS Blocks and Pages: Review database tables (cms_block, cms_page) for injected <script> tags pointing to unknown external domains or obfuscated JavaScript.
  4. Rotate Database and API Credentials: If unauthorized files were detected in pub/media/, rotate all database passwords, admin user credentials, and payment gateway integration tokens (app/etc/env.php).