Magento PolyShell Allows Unauthenticated File Upload and Conditional RCE
Vulnerability Disclosure · 2 sources · Updated 3mo ago · First seen Mar 17, 2026

The PolyShell flaw, tracked in Adobe advisory APSB25-94, allows unauthenticated attackers to use Magento Open Source and Adobe Commerce guest-cart REST API requests to upload attacker-controlled image polyglot files into pub/media/custom_options/. The issue affects production releases reportedly through 2.4.9-alpha2 and stems from validation that accepts image content and MIME types without enforcing that the supplied filename extension matches the validated image format.
Remote code execution is possible when Apache or Nginx exposes the custom-options upload path and permits PHP execution there. Even where server configuration prevents execution, attackers can persist arbitrary files in the directory and may obtain stored XSS if uploaded content is web-accessible. Organizations should apply Adobe’s relevant remediation, ensure upload directories cannot execute scripts or be directly exposed, and investigate pub/media/custom_options/ for unexpected non-image files before making web-server configuration changes.


