{"id":336,"date":"2026-03-20T12:59:10","date_gmt":"2026-03-20T12:59:10","guid":{"rendered":"https:\/\/thedigitalfortress.us\/?p=336"},"modified":"2026-03-20T12:59:10","modified_gmt":"2026-03-20T12:59:10","slug":"magento-polyshell-flaw-enables-unauthenticated-uploads-rce-and-account-takeover","status":"publish","type":"post","link":"https:\/\/thedigitalfortress.us\/?p=336","title":{"rendered":"Magento PolyShell Flaw Enables Unauthenticated Uploads, RCE and Account Takeover"},"content":{"rendered":"<div>\n<p><span class=\"p-author\"><i class=\"icon-font icon-user\">\ue804<\/i><span class=\"author\">Ravie Lakshmanan<\/span><i class=\"icon-font icon-calendar\">\ue802<\/i><span class=\"author\">Mar 20, 2026<\/span><\/span><span class=\"p-tags\">Web Security \/ Vulnerability<\/span><\/p>\n<\/div>\n<div id=\"articlebody\">\n<div class=\"separator\" style=\"clear: both;\"><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjmvoo5bgNhw6SuInM6rRH_pdtYFmiDdMlG7hS2GdUJfwhXoOClt29lEpxaqI27b6XOOfX3eO8eHlUM0LA55P9U_HfWgVPyqDWMO01Chkp6aC-is0292EqVXPRjwesdZl9igZ0iD7NdoW8rQhKRVfF7s_I98a8r2YOk3-vjDMEz4eGGVXjmt-nUJpLpM4OL\/s1700-e365\/mag.jpg\" style=\"display: block;  text-align: center; clear: left; float: left;\"><\/a><\/div>\n<p>Sansec is warning of a critical security flaw in Magento&#8217;s REST API that could allow unauthenticated attackers to upload arbitrary executables and achieve code execution and account takeover.<\/p>\n<p>The vulnerability has been codenamed <strong>PolyShell<\/strong> by Sansec owing to the fact that the attack hinges on disguising malicious code as an image. There is no evidence that the shortcoming has been exploited in the wild. The unrestricted file upload flaw affects all Magento Open Source and Adobe Commerce versions up to 2.4.9-alpha2.<\/p>\n<p>The Dutch security firm said the problem stems from the fact that Magento&#8217;s REST API accepts file uploads as part of the custom options for the cart item.<\/p>\n<p>\u00abWhen a product option has type &#8216;file,&#8217; Magento processes an embedded file_info object containing base64-encoded file data, a MIME type, and a filename,\u00bb it <a href=\"https:\/\/sansec.io\/research\/magento-polyshell\" rel=\"noopener\" target=\"_blank\">said<\/a>. \u00abThe file is written to pub\/media\/custom_options\/quote\/ on the server.\u00bb<\/p>\n<p>Depending on the web server configuration, the flaw can enable remote code execution via PHP upload or account takeover via stored XSS.<\/p>\n<div class=\"dog_two clear\">\n<div class=\"cf\"><a href=\"https:\/\/thehackernews.uk\/not-fast-enough-d\" rel=\"nofollow noopener sponsored\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"lazyload\" alt=\"Cybersecurity\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhlXM830ruQd2xT6M7JNeNRjaFa1onD12WjSCHihTFMTzbyfT9h-irPmXy_h3E1HGSs6sdv7FTmnyNVTM5kmSb7BuUtZe8gKoTQt99P1sSzRcqqXpOJP6eoAOhR3DGb6qHx9kOZ_HBZUMmVnsnd0DM7QfUp81bgzTvvgLww6oqB-EhnDfWXH5pWCYhAsyLs\/s728-e100\/tl-d.jpg\" width=\"729\" height=\"91\"\/><\/a><\/div>\n<\/div>\n<p>Sansec also noted that Adobe fixed the issue in the 2.4.9 pre-release branch as part of <a href=\"https:\/\/helpx.adobe.com\/in\/security\/products\/magento\/apsb25-94.html\" rel=\"noopener\" target=\"_blank\">APSB25-94<\/a>, but leaves current production versions without an isolated patch.<\/p>\n<p>\u00abWhile Adobe provides a sample web server configuration that would largely limit the fallout, the majority of stores use a custom configuration from their hosting provider,\u00bb it added.<\/p>\n<p>To mitigate any potential risk, e-commerce storefronts are advised to perform the following steps &#8211;<\/p>\n<ul>\n<li>Restrict access to the upload directory (\u00abpub\/media\/custom_options\/\u00bb).<\/li>\n<li>Verify that nginx or Apache rules prevent access to the directory.<\/li>\n<li>Scan the stores for web shells, backdoors, and other malware.<\/li>\n<\/ul>\n<p>\u00abBlocking access does not block uploads, so people will still be able to upload malicious code if you aren&#8217;t using a specialized WAF [Web Application Firewall],\u00bb Sansec said.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\ue804Ravie Lakshmanan\ue802Mar 20, 2026Web Security \/ Vulnerability Sansec is warning of a critical security flaw in Magento&#8217;s REST API that could allow unauthenticated attackers to upload arbitrary executables and achieve&hellip;<\/p>\n","protected":false},"author":1,"featured_media":337,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[573,724,70,793,794,316,754,725,795],"class_list":["post-336","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-account","tag-enables","tag-flaw","tag-magento","tag-polyshell","tag-rce","tag-takeover","tag-unauthenticated","tag-uploads"],"_links":{"self":[{"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/posts\/336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=336"}],"version-history":[{"count":0,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/posts\/336\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=\/wp\/v2\/media\/337"}],"wp:attachment":[{"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thedigitalfortress.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}