Security Patch for Zen Cart™ 1.3.8While we do not charge for this software, donations are greatly appreciated each time you download a new version, to help cover the expenses of maintenance, upgrades, updates, the free support forum and the continued development of this software for your online e-commerce store. Donations can be made at: The Zen Cart™ Team Page We appreciate your support. The Zen Cart™ Team This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE and is redistributable under the GNU General Public License |
![]() This software is OSI Certified Open Source Software. OSI Certified is a certification mark of the Open Source Initiative. |
IntroductionIn our Security Recommendations for all Zen Cart™ users, we stress the need to rename your "/admin" folder. We also have prominent warnings in the administration section of the Zen Cart™ store, to remind users when they have not changed the folder name. Recently we have been informed of some vulnerabilities in the store code which could potentially allow an attacker to gain access to the Administration section. To take advantage of theses vulnerabilities, the attacker needs to know the location of the Zen Cart™ Administration section.
While renaming the "/admin" provides protection against this vulnerability, we decided that this "Security through obscurity" was not sufficient, and therefore released this patch to address the vulnerability at the software level. It should be noted that we are not the only Ecommerce system that relied on "Security through Obscurity" to protect the Aministration Section, as evidenced by this link Installing this security patch on your Zen Cart™ 1.3.x storeThe following is a list of the steps you need to take to install this security patch on your Zen Cart™ site: 1. Files in the Security Patch
The files in the list above that are marked NEW FILE, can be simply uploaded to the corresponding directories in your stores admin directory. Hopefully after all the subtle hinting you will have renamed your "/admin" directory ! The html_output.php file will already exist in your Zen Cart™ installation, and how you deal with that file will depend on whether you have altered that file or not. If you are sure it has not been altered you can simply overwrite the original file with the version that came with this patch. Otherwise you will need to change your version by hand. Fortunately the change is minor and is described below. Note you do not have to upload any other files, e.g the .html files that came with this security patch. A word of WARNING. The html_ouptut.php file also exists in <STORE>/includes/functions/ directory. You must not change this version, only the one that exists in your admin directory. 2. Amending html_output.php by handTo amend the <YOUR ADMIN DIRECTORY>/includes/functions/html_output.php by hand is fairly straightforward. However before attempting to edit this file, please make sure you have a secure backup of the original version.Open the file in an editor and find the function "zen_draw_form" The last line of this function is return $form; Just before that line add another line as below $form .= '<input type="hidden" name="securityToken" value="' . $_SESSION['securityToken'] . '" />'; You can then save the file. 3. Test changesWith all the changes in place, you should now test that you can still access your Administration panel, and that nothing in the Administration panel appears to have been adversely affected by the changes. If you do have any problems, then you should revert to the original version of html_ouput.php (You did make a backup, didn't you) and remove the other 4 files that are part of this security patch. Please use the Zen Cart™ Forums for advice and/or to notify us of any problems with the patch. Previous Zen Cart VersionsThis patch was specifically written and tested using the most up to date Zen Cart release (v1.3.8), however it will also work with all other 1.3.x releases. We cannot however confirm that it will fully work with previous versions.
Any one using v1.2.x is advised to upgrade their store as soon as possible.
However, the following file contained in this patch:. <YOUR ADMIN DIRECTORY>/includes/function/extra_functions/security_patch_v138_20090619.php is compatible with 1.2.x releases, and people using those versions are advised to at least upload this file. You should also ensure that you have any other patches for your system installed. Details of previous patches can be found in the Release Annoucements section of the Zen Cart Forums. |