Stores still running Magento 1 code through OpenMage LTS have a patch to apply. On December 3, 2026, the maintainers published security advisory GHSA-qjwx-wccq-qmj5, which describes how an attacker used a flaw in the legacy product media API to plant a web shell on a live store running version 20.19.1.

    No CVE has been assigned. The fixed versions are 20.18.6, 20.19.4 and 21.0.0-beta7.

    Where the bug sits

    The flaw is in catalog_product_attribute_media.update, the old method for replacing an existing product gallery image. It can be reached through the SOAP, SOAP v2, XML-RPC and JSON-RPC adapters, the remote APIs that Magento 1 integrations were built on years ago and that some shops still keep running.

    The OpenMage security advisory on GitHub says the method built its write path from the stored gallery filename and never kept that path inside the product media directory. It also never checked whether the uploaded bytes were an image.

    Those two gaps add up to path traversal (CWE-22) plus unrestricted upload (CWE-434). That pairing can leave PHP code in a web directory that will run it.

    Why the attacker also needed SQL injection

    An attacker can’t reach this flaw without access. The caller needs an API role that includes Catalog > Product > Media > Update, and the gallery row being updated must already contain a traversing path.

    OpenMage’s normal save routines reject rows like that. In the confirmed incident, the attacker first used a separate SQL injection to change stored gallery data and then called the media update method to write the shell.

    The score reflects that chain. The base CVSS 3.1 score is 6.6 (moderate) because the attack has high complexity and needs high privileges. The maintainers say a store that also has a SQL injection flaw should treat it as 7.2 (high).

    Without a crafted row, the risk is smaller but still there. An API user with media update rights can overwrite existing product images with any bytes they like.

    How far it has spread

    One compromised store is confirmed. GBHackers’ write-up notes that the disclosure doesn’t say whether other merchants were targeted, and it gives no details about the web shell. Magento 2 is not affected.

    Once technical details are public, one incident can turn into many. The WP Rocket plugin flaw that attackers exploited days after its patch is a recent example.

    GitHub user hirale reported the issue and wrote the fix, and maintainer colinmollenhour coordinated the release. The advisory says the report was prepared with AI assistance.

    What the patch changes

    In the fixed releases, update() validates the filename, keeps it inside the product media directory and requires an image extension. It also re-encodes the content through the image validator before writing anything to disk.

    Integrations may notice the change. A path outside the media directory or without an image extension now returns a not_created fault, and content that isn’t an image is refused.

    What store owners should do

    Upgrade to 20.18.6, 20.19.4 or 21.0.0-beta7, depending on your branch. The builds are on the magento-lts releases page.

    Updating won’t remove a shell that is already on the server. As with the Drupal core flaw that allowed full site takeover, a patch closes the hole but doesn’t remove an attacker who is already in. Save your logs and any suspicious files before you clean up, then:

    • Look through legacy API and web server logs for media update calls you can’t explain.
    • Check gallery records for .. in the stored value.
    • Look for unfamiliar PHP files in web-accessible directories.

    If you don’t use the legacy API, block api.php and the /api/(soap|v2_soap|xmlrpc|jsonrpc) routes at the web server. You can also remove Media > Update from any API role that doesn’t need it.

    Make sure PHP can’t run under media/. The .htaccess file OpenMage ships handles this on Apache. On Nginx, you have to add an equivalent rule yourself.

    Grace is a technical SEO specialist and web developer who writes about structured data, metadata, and site configuration for Webcode Tools. She helps websites improve how they appear in search results and on social platforms, and her guides explain the code behind it in a straightforward, practical way.