New Zero Day Magento Vulnerability Lets Hackers Take Over Sites in Seconds

A critical zero-day vulnerability in Magento called PolyShell enables attackers to take over e-commerce sites without authentication, requiring no user...

A critical zero-day vulnerability in Magento called PolyShell enables attackers to take over e-commerce sites without authentication, requiring no user interaction and allowing complete remote code execution in seconds. Discovered by security researchers at Sansec in March 2026, PolyShell exploits an unrestricted file upload flaw in Magento’s REST API by uploading polyglot files—files disguised as harmless images but executable as PHP code—giving hackers instant access to the store’s backend. Since public disclosure on March 17, 2026, attackers have already compromised over 7,500 Magento-powered e-commerce websites within the first week, with exploitation spreading to approximately 15,000 hostnames across 7,500 domains, demonstrating just how quickly this vulnerability has weaponized against live commercial sites.

The PolyShell vulnerability affects all versions of both Magento Open Source and Adobe Commerce up to version 2.4.9-alpha2, putting roughly 130,000 online stores at immediate risk. What makes this threat especially dangerous is that the patch has not been backported to older, still-supported versions like 2.4.8, 2.4.7, and earlier, leaving most running installations vulnerable even after Adobe released the fix in version 2.4.9. The attack campaign escalated rapidly—just two days after March 17 disclosure, mass exploitation began on March 19, and by week’s end, 56.7% of all vulnerable stores had been breached, a faster compromise rate than most zero-days in recent memory. For site owners, developers, and security teams managing Magento stores, this vulnerability represents an immediate operational crisis requiring urgent action, not a patch-and-forget scenario.

Table of Contents

How Does the PolyShell Zero-Day Vulnerability Actually Work?

PolyShell operates through a two-part attack chain: an unauthenticated file upload flaw in magento‘s REST API combined with polyglot file technology. An attacker crafts a file that appears to be a legitimate image file to automated defenses but contains executable PHP code embedded within it. When uploaded to a vulnerable Magento store through the REST API without any authentication requirement, the malicious polyglot file sits on the server waiting to be triggered. Once executed, the code grants the attacker complete remote access—they can steal customer data, modify product listings, inject malware into checkout pages, steal payment information, or create administrative accounts.

The attack is remarkably efficient because polyglot files are difficult to detect with standard file validation. A file might pass magic number checks (which verify the file header), MIME type inspection, and even casual human review as a normal image, all while containing fully functional PHP code. Because Magento’s REST API endpoint didn’t properly validate or restrict file uploads, attackers don’t need credentials, don’t need to interact with the admin panel, and don’t even need to know specific store details—they can target multiple sites with the same automated payload. The simplicity and reliability of this approach is why 56.7% of vulnerable stores fell within the first week alone.

How Does the PolyShell Zero-Day Vulnerability Actually Work?

The Scope of the PolyShell Threat: Who’s Actually at Risk?

Approximately 130,000 Magento stores globally are potentially affected by PolyShell, but the actual compromise has already been catastrophic: confirmed cases show 7,500+ stores actively exploited, with malicious files deployed across 15,000+ hostnames. This means some of the largest e-commerce operations in the world have already been infiltrated, with attackers installing persistent backdoors that can remain undetected for months if not actively hunted. The limitation in the current situation is that the patch distribution has been asymmetric.

Adobe released the fix exclusively in Magento 2.4.9, but this is a beta version for most organizations—the company has not backported the security fix to actively supported legacy versions (2.4.8, 2.4.7, 2.4.6, and earlier), leaving administrators in a difficult position. Updating to an alpha or beta release for production e-commerce is risky and not recommended, yet staying on older versions means staying vulnerable. This creates a catch-22 where many store operators face a choice between the known vulnerability or the unknown risks of running beta software in production.

Magento Store Exploitation Timeline – PolyShell VulnerabilityPre-Disclosure (Feb)0% of Vulnerable Stores CompromisedPublic Disclosure (Mar 17)0% of Vulnerable Stores CompromisedMass Campaign Launch (Mar 19)30% of Vulnerable Stores CompromisedWeek 1 (Mar 19-26)56.7% of Vulnerable Stores CompromisedCurrent (Est. Mar 26+)70% of Vulnerable Stores CompromisedSource: Sansec Research, V-Formation Threat Analysis, CyberSecurityNews

The Real-World Impact: What Happens After a Store Gets Compromised?

Once a Magento store is compromised through PolyShell, the attacker gains capabilities beyond simple data theft. Using the foothold from the polyglot file, they can exploit related vulnerabilities like CVE-2025-54236 to perform account compromise, or inject stored cross-site scripting (XSS) attacks that steal customer login credentials and payment information at checkout time. A compromised Magento store doesn’t fail—it keeps operating normally, processing orders and serving customers while silently funneling sensitive data to attackers.

A concrete example illustrates the damage: if an attacker gains access through PolyShell, they might install a persistent backdoor that logs all customer credit card data as it’s entered during checkout, remains in place for six months before discovery, and expose the payment information of thousands of customers. By the time the breach is detected, the store’s reputation is damaged, customers must be notified, credit card processors may levy fines, and the store faces potential regulatory investigations. In some cases, payment processors have terminated merchant relationships after discovering infections from PolyShell and similar vulnerabilities.

The Real-World Impact: What Happens After a Store Gets Compromised?

Urgent Response: How Should Site Owners and Developers Act Now?

The immediate steps for Magento store operators involve assessment, isolation, and remediation. First, determine your current Magento version—if you’re running 2.4.9-alpha2 or earlier, you’re potentially vulnerable. Check your server logs and web application firewall (WAF) logs for suspicious REST API requests to file upload endpoints, especially requests that don’t include authentication tokens. If you find indicators of compromise, you should assume the store has been infiltrated and treat it as an active incident requiring forensic investigation.

The practical challenge is that patching is not straightforward for most stores. If you’re on version 2.4.8 or earlier, upgrading directly to 2.4.9-beta exposes you to untested code in production. A safer approach is to apply temporary mitigations immediately: restrict REST API file upload endpoints at the web server or WAF level, implement request authentication checks, monitor for polyglot files, and consider taking the store offline while you plan a comprehensive update strategy. Some organizations are implementing a two-stage approach—first applying a restrictive WAF rule set to block the known attack vectors while keeping the store online, then planning a longer-term upgrade during a maintenance window.

Detection and Forensics: Finding Compromise Evidence

Detecting PolyShell compromise requires looking beyond standard intrusion detection signatures. The polyglot files left behind by attackers may be buried in image directories, upload folders, or temporary locations, and they might carry legitimate-looking filenames mixed with media assets. A forensic approach involves scanning the entire filesystem for PHP files in unexpected locations (especially within the media, var, or pub directories), reviewing recent REST API logs for file upload requests, and checking for newly created or modified administrator accounts.

A significant limitation of detection is that many small and mid-sized store operators lack the forensic expertise or tools to conduct thorough compromise assessments. They may only discover the breach when customers report fraudulent charges on credit cards weeks or months later, by which time the attacker has extracted maximum value. For this reason, proactive scanning using specialized Magento security tools, vulnerability scanners that test the REST API upload endpoint, and continuous file integrity monitoring should be part of standard practice, not an emergency response. Teams managing multiple Magento stores should inventory all versions and prioritize patching or applying mitigations to all 2.4.8 and earlier installations immediately.

Detection and Forensics: Finding Compromise Evidence

Temporary Mitigations While Planning Upgrades

Before applying the Magento 2.4.9 patch, many organizations are implementing emergency WAF rules that block or authenticate REST API requests to file upload endpoints. This approach trades some functionality (such as automated integrations or third-party tools that rely on unrestricted file uploads) for security, but it’s an acceptable tradeoff when facing active exploitation.

Some teams have also implemented file upload filtering that explicitly blocks polyglot files by analyzing file entropy and checking for embedded PHP signatures within image files. For WordPress and Drupal sites in the same environment, administrators should recognize that PolyShell specifically affects Magento’s implementation, but the same underlying principle—unrestricted file uploads—is a common vulnerability across all content management systems. If your infrastructure runs multiple CMS platforms, this is an opportunity to audit file upload handling across all of them.

The Broader Lesson: Zero-Day Readiness in Modern E-Commerce

The PolyShell incident reveals a critical gap in the current patch-and-update model for enterprise e-commerce. When a zero-day fix is released only in a beta version and not backported to stable supported releases, organizations are forced into an uncomfortable position.

Forward-looking e-commerce businesses are now reconsidering their platform choices and upgrade strategies, with some accelerating plans to move to fully managed commerce platforms where security patching is handled automatically. Looking ahead, the e-commerce security landscape will likely shift toward more aggressive automatic patching (similar to SaaS platforms), stricter API authentication requirements by default, and potentially stricter payment processor requirements for stores running non-current versions of major platforms. For development teams, this incident reinforces that security reviews should include REST API endpoints, especially those handling file operations, and that relying solely on file type checking without deeper validation is insufficient in modern threat environments.

Conclusion

The PolyShell zero-day vulnerability demonstrates that even mature, widely-used e-commerce platforms like Magento can harbor critical flaws that enable complete site takeover within seconds. With over 7,500 stores already compromised, 130,000 at risk, and an exploitation rate of 56.7% within the first week, this is not a theoretical concern—it’s an active, ongoing attack affecting real commercial operations. The combination of unauthenticated file upload and polyglot file technology creates a uniquely dangerous attack surface that bypasses many standard security controls.

Site owners and development teams must take immediate action: verify your Magento version, check for compromise indicators, apply WAF mitigations, and plan a timeline for upgrading to a patched version. While Magento 2.4.9 contains the fix, the lack of backports to earlier supported versions creates a difficult upgrade decision that requires balancing security against operational risk. Organizations should not wait for a “stable” patch release—treat this vulnerability as an active threat and allocate resources to remediation now.


You Might Also Like