Intel

AIKIDO-2026-572808

magento/product-community-edition is vulnerable to Unrestricted File Upload

Unrestricted File UploadCVE-2025-54264 Published Jul 27, 2026

98

Critical Risk

This Affects:

PHPmagento/product-community-edition
2.0.0 - 2.4.6-p12
Fixed in 2.4.6-p13
2.4.7 - 2.4.7-p7
Fixed in 2.4.7-p8
2.4.8 - 2.4.8-p2
Fixed in 2.4.8-p3
2.4.9-alpha1 - 2.4.9-alpha2
Fixed in 2.4.9-alpha3
Are you affected? Scan for Free

TL;DR

Guest-cart REST endpoints such as POST /V1/guest-carts/:cartId/items process product_option file_info uploads without verifying that the option ID exists on the product, that the option is file-typed, or that the filename extension is safe. An unauthenticated attacker who knows a product SKU can therefore write a polyglot image-plus-PHP payload under pub/media/custom_options/quote/ with an attacker-controlled name (for example .php / .phtml / .phar). When the web server executes PHP in that directory, the upload becomes remote code execution; even when execution is blocked, the file persists on disk. This issue is exploited in the wild, and public exploit tooling is available. The fix introduces ImageContentProcessor extension validation (via NotProtectedExtension) during custom-option file processing so dangerous extensions are rejected before the file is saved.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and the Magento REST API is reachable, especially guest-cart item routes that accept custom option file_info uploads.

Background info

magento/product-community-edition is vulnerable to Unrestricted File Upload in versions 2.4.9-alpha1 - 2.4.9-alpha2, 2.4.8 - 2.4.8-p2, 2.4.7 - 2.4.7-p7 and 2.0.0 - 2.4.6-p12.

How to fix this

Upgrade magento/product-community-edition to the patch version.