CVE-2026-40488
Remote Code Execution via File Upload in OpenMage LTS
Publication date: 2026-04-20
Last updated on: 2026-04-23
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| openmage | magento | to 20.17.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-434 | The product allows the upload or transfer of dangerous file types that are automatically processed within its environment. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-40488 is a Remote Code Execution (RCE) vulnerability in OpenMage Long Term Support (LTS) versions prior to 20.17.0. It arises because the product's custom option file upload feature uses an incomplete blocklist that only forbids files with the extensions .php and .exe. However, attackers can bypass this blocklist by uploading files with alternative PHP-executable extensions such as .phtml, .phar, .php3, .php4, .php5, .php7, and .pht.
Uploaded malicious files are stored in a publicly accessible directory (media/custom_options/quote/) which, in some server configurations, does not have restrictions preventing script execution. This allows attackers to execute arbitrary PHP code remotely by accessing the uploaded file, leading to Remote Code Execution.
How can this vulnerability impact me? :
This vulnerability can have severe impacts including full server compromise through Remote Code Execution. An attacker can upload a malicious webshell and execute arbitrary PHP code on the server.
- Full server compromise
- Data exfiltration, including database credentials, customer personally identifiable information (PII), and payment data
- Lateral movement within internal infrastructure
- Supply chain compromise by injecting malicious code into served content
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by checking for the presence of uploaded files with alternative PHP-executable extensions in the publicly accessible directory `media/custom_options/quote/`. These extensions include `.phtml`, `.phar`, `.php3`, `.php4`, `.php5`, `.php7`, and `.pht`.
You can use commands to search for such files on your server. For example, using a Linux shell:
- find /path/to/magento/media/custom_options/quote/ -type f \( -name "*.phtml" -o -name "*.phar" -o -name "*.php3" -o -name "*.php4" -o -name "*.php5" -o -name "*.php7" -o -name "*.pht" \)
Additionally, you can check your web server logs for requests to URLs matching the pattern `/media/custom_options/quote/*` with these extensions to detect possible exploitation attempts.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include:
- Upgrade OpenMage LTS to version 20.17.0 or later, where the blocklist has been expanded to include all dangerous file extensions.
- Configure your web server to explicitly deny script execution in the `media/custom_options/quote/` directory. For example, in Apache, disable PHP execution in that directory using `php_flag engine off` or equivalent directives.
- Review and remove any suspicious files with executable extensions in the upload directory.
- Harden your web server configuration to prevent forwarding of these alternative PHP extensions to the PHP interpreter, especially if using PHP-FPM.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
This vulnerability enables Remote Code Execution (RCE) which can lead to full server compromise.
Such a compromise can result in data exfiltration including database credentials, customer personally identifiable information (PII), and payment data.
Exposure or theft of PII and payment data can cause non-compliance with regulations like GDPR and HIPAA, which mandate protection of sensitive personal and health information.
Therefore, exploitation of this vulnerability could lead to violations of these common standards and regulations due to unauthorized access and disclosure of protected data.