Visualização de leitura

PolyShell flaw exposes Magento and Adobe Commerce to file upload attacks

Sansec found a Magento and Adobe Commerce REST API flaw, named PolyShell, which allows unauthenticated file uploads and possible XSS in older versions.

Sansec disclosed a critical flaw in the Magento and Adobe Commerce REST API that allows attackers to upload executable files without authentication. The issue affects versions up to 2.4.9-alpha2 and could also enable XSS in releases prior to 2.3.5, exposing many online stores to compromise.

“A new vulnerability in the Magento and Adobe Commerce REST API allows attackers to upload executable files to any store. Adobe fixed the issue in a pre-release version but has not backported the patch.” reads the advisory by Sansec. “Many stores run web server configurations that enable either remote code execution (RCE) or account takeover (stored XSS).”

The name “PolyShell” stems from the use of a polyglot (code disguised as an image).

Magento’s REST API allows file uploads via cart item options by processing base64-encoded data and saving it to a server directory. This affects REST only, as GraphQL uses a different, non-vulnerable path.

“Magento’s REST API accepts file uploads as part of the cart item custom options. When a product option has type “file”, Magento processes an embedded file_info object containing base64-encoded file data, a MIME type, and a filename. The file is written to pub/media/custom_options/quote/ on the server.” continues the report. “GraphQL mutations use a different code path and are not vulnerable.”

The vulnerability has existed since Magento 2’s first release and was only addressed in the 2.4.9 pre-release (APSB25-94), with no standalone patch for current production versions. While Adobe suggests configurations to reduce risk, many stores use custom setups that leave upload directories exposed.

“The vulnerable code has existed since the very first Magento 2 release. Adobe fixed it in the 2.4.9 pre-release branch as part of APSB25-94, but no isolated patch exists for current production versions.” continues the report. “While 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.”

Even if execution is blocked, malicious files remain on disk and could become active after future configuration changes or migrations.

Sansec pointed out that no official patch is available yet for production Magento versions, so mitigation is key. Organizations should block attacks in real time with a WAF, restrict access to upload directories via proper server configuration, and scan systems for compromise. Note that blocking access alone doesn’t stop malicious uploads, making active protection essential.

Sansec has not seen active exploitation yet, but the exploit is already circulating, and automated attacks are likely to emerge soon.

Magento-powered e-stores are a prime target for hackers. This week, cybersecurity firm Netcraft reported that, since February 27, a large-scale campaign has defaced over 7,500 Magento sites, targeting e-commerce platforms, global brands, and government services. Attackers placed plaintext defacement files across more than 15,000 hostnames, directly compromising affected infrastructure.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, PolyShell)

7,500+ Magento sites defaced in global hacking campaign

Hackers defaced 7,500 Magento sites since Feb 27, uploading files across 15,000 hostnames, mostly opportunistic attacks.

Since February 27, a large-scale campaign has defaced over 7,500 Magento sites, targeting e-commerce platforms, global brands, and government services. According to cybersecurity firm Netcraft, attackers placed plaintext defacement files across more than 15,000 hostnames, directly compromising affected infrastructure.

“Netcraft detected this campaign’s first activity on 27 February 2026, with newly compromised sites continuing to appear at the time of writing.” reads the report published by Netcraft. “Netcraft is tracking this campaign’s activity over 15,000+ hostnames (subdomains) within ~7,500 unique domains. Defacements were uploaded as plaintext files hosted directly on affected infrastructure.”

Defacement pages show handles like L4663R666H05T, Simsimi, Brokenpipe, and Typical Idiot Security, often with “greetz” lists typical of defacement culture.

Most defaced sites hosted simple txt files showing attacker handles, often with “greetz” lists. A few (under 10) contained brief geopolitical messages on 7 March 2026, not central to the campaign. Many pages were reported to Zone-H by “Typical Idiot Security,” suggesting the actor self-reports to gain notoriety.

Initial investigation indicates attackers may exploit unauthenticated file uploads in some Magento environments, affecting Open Source, Enterprise, and B2B editions. Netcraft researchers observed only text defacements. While Adobe released security bulletins, these do not appear directly linked. The campaign resembles the October 2025 SessionReaper attack, with successful test uploads on Magento Community 2.4.9-beta1, highlighting Magento’s widespread global use.

The campaign hit high-profile brands like Toyota, Fiat, Asus, Bandai, FedEx, and others, mostly on subdomains, staging, or regional sites, with some production sites briefly affected. The campaign hit Government and academic domains in Latin America and Qatar, and non-profits. Attackers also defaced several Trump Organization domains, likely as part of broad opportunistic exploitation rather than targeted attacks.

“Given the scale of the activity and the number of high-profile domains affected, this campaign highlights how widely deployed web platforms can become a force multiplier for attackers conducting opportunistic exploitation.” concludes the report.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, defacement)

❌