OpenMage LTS: Customer File Upload Extension Blocklist Bypass → Remote Code Execution
Date: 2026-04
Affected: composer/openmage/magento-lts
Attack vector: rce
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2026-40488
CWE: CWE-434
CVSS: 8.8 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)

The product custom option file upload in OpenMage LTS uses an incomplete blocklist (`forbidden_extensions = php,exe`) to prevent dangerous file uploads. This blocklist can be trivially bypassed by using alternative PHP-executable extensions such as `.phtml`, `.phar`, `.php3`, `.php4`, `.php5`, `.php7`, and `.pht`. Files are stored in the publicly accessible `media/custom_options/quote/` directory, which lacks server-side execution restrictions for some configurations, enabling Remote Code Execution if this directory is not explicitly denied script execution. ## Affected Version - **Project:** OpenMage/magento-lts - **Vulnerable File:** `https://github.com/OpenMage/magento-lts/blob/main/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php` - **Vulnerable Lines:** 230-237 (`_validateUploadedFile()`) - **Configuration:** `app/code/core/Mage/Catalog/etc/config.xml:824` ## Root Cause The file upload handler uses `Zend_File_Transfer_Adapter_Http` directly with `ExcludeExtension` validator, referencing only: ```xml <!-- Catalog/etc/config.xml:824 --> <forbidden_extensions>php,exe</forbidden_extensions> ``` This misses the comprehensive `protected_extensions` blocklist defined elsewhere: ```xml <!-- Core/etc/config.xml:449-478 --> php, php3, php4, php5, php7, htaccess, jsp, pl, py, asp, sh, cgi, htm, html, pht, phtml, shtml ``` ## Vulnerable Code ```php // app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php:230-237 $_allowed = $this->_parseExtensionsStrin


Mitigations:

Architectural layers (MAESTRO):