SecurityOnlineDo Son
OpenMage Magento LTS zero day exploited to install web shell
Attackers have exploited a zero-day in the OpenMage LTS platform to drop a web shell on live Magento LTS stores. The issue resides in the legacy product media API, enabling an attacker with an API role that has Catalog > Product > Media > Update permission to introduce a malicious gallery row into the database and then trigger a crafted update call to write arbitrary content to the PHP file system.
OpenMage notes that an additional SQL injection seed for the gallery row is used in at least one observed case, explaining why exploitation is described as complex despite its live impact. The incident resulted in a web shell being placed on a store running 20.19.1, with the overall RCE potential arising from arbitrary file writes in a PHP directory when the uploaded bytes are not validated as images. The flaw is rated with a medium CVSS base score of 6.6, rising to 7.2 on stores that also suffer from separate SQL injection.
Affected products and fixes: OpenMage LTS versions affected include 20.18.5 and earlier, 20.19.0 through 20.19.3, and 21.0.0-beta1 through 21.0.0-beta6. OpenMage has released patches to address the vulnerability in OpenMage LTS 20.19.4, 20.18.6 and 21.0.0-beta7, confining file names to the product media directory and re-encoding uploads as images.
The advisory recommends mitigating steps such as blocking api.php and legacy API endpoints if unused, or removing Media > Update permissions from API roles; Apache’s .htaccess can curb PHP execution under media, though nginx requires a specific rule.
Detection guidance includes auditing the catalog_product_entity_media_gallery table for values containing “..” and watching for unexpected PHP files in store roots or media folders, complemented by patching any SQL injection vulnerabilities to close the exploitation chain. The OpenMage advisory GHSA-qjwx-wccq-qmj5 is referenced for full technical detail. The vulnerability has no CVE ID yet and is not listed in the CISA KEV catalog.