magento/product-community-edition is vulnerable to Unrestricted File Upload
98
Critical Risk
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.
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.
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.
Upgrade magento/product-community-edition to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant