OpenCart security
CVE-2026-18412 in OpenCart 4.2.0.0. How to install extensions safely?
CVE-2026-18412 concerns the extension installer in OpenCart 4.2.0.0. A specially crafted package can write files outside the installation directory, including the store’s public directory. The attack does, however, require the ability to install a malicious extension.
Next step
Check the OpenCart version, the history of installed extensions and the package sources. If an unknown module has already been uploaded, you also need to check the store’s files and logs.
01
What CVE-2026-18412 is about
OpenCart extensions are installed from archives ending in ocmod.zip. In version 4.2.0.0 the installer doesn’t properly check whether all paths stay within the intended directory after extraction. A malicious archive can contain references to parent directories and write a file elsewhere on the server.
02
What the impact of the vulnerability can be
If a PHP file ends up in the public directory, the web server can execute it. In the worst case this leads to code execution, reading the store configuration, modifying files or accessing data. The extent of the impact also depends on the permissions of the system user PHP runs as.
03
What the vulnerability doesn’t mean
This isn’t an automatic takeover of every OpenCart store on the internet. The attacker has to get the crafted package installed. That could mean a compromised administrator account, carelessly installing a module from an unknown source or access gained some other way. This condition matters when assessing the risk.
04
How to choose OpenCart extensions
- Download modules from a known source and check their author.
- Verify compatibility with the OpenCart and PHP versions you use.
- Review the contents of the archive before installing.
- Back up the database, files and the storage directory.
- Test the module first in an environment that doesn't serve customers.
05
What to check after installing a suspicious package
Compare files with a trusted backup, and check the public directory, the extensions directory, storage and the application’s bootstrap files. It’s worth reviewing server logs, new administrator accounts, modified tasks and outgoing connections. Removing the module alone may not be enough if the package wrote files outside its own directory.
06
How to limit the impact of similar bugs
The PHP process should have only the permissions the store needs. It’s worth protecting the admin panel with additional authentication and limiting the number of accounts allowed to install modules. Every extension installation should leave a trace in the change procedure, with the package source, version and test results.
07
Where to follow CVE information
Details and a description of the scenario are published by the CERT Coordination Center. The vulnerability record can also be checked in the NVD. Before any change, compare the version you use with the current information from the OpenCart vendor.
Related materials and sources
Not sure where an OpenCart module came from?
We’ll check the store version, the extension package, changed files and logs. You’ll get a risk assessment, the scope of work needed and a plan for safe deployment.
Only 3 required fields · reply within 1 business day · no obligation
