Magento is an open-source platform that consists of all leading cutting edge functionalities in one pack. But using an open-source platform has always drawback that is code is openly available to all which is like open invitations to hackers and attackers. And security is one of the important factors for any Ecommerce stores. Having wide Magento Community, Magento Developers are working hard to improve and enhance CMS with their regular updates. For new Magento version it by default includes all security enhancement but what about old Magento stores? To protect each store Magento is always releasing small security patches or you can say SUPEE that contains bug fixes and security enhancement to protect your store from vulnerabilities.
But why it is important to apply these security patches to your Magento Store?
In the year 2015, Check Point researchers discovered a critical remote code execution (RCE) Hazard in Ecommerce platform Magento which can bulge to outright compromise of any Magento store, which may include personal data, credit card info and other data which can affect nearly 200 thousand online shops.
So, we always recommended store owner to upgrade their store but if you dont want to upgrade your store so frequently one should have to install security patches to keep their store secure and up to date.
Magento has already released one patch last year, but 80% of Magento stores haven’t applied and so those were vulnerable, so Magento have to send notification to install patches and make your Magento store secure. This Remote code vulnerability was originally founded by Check Point and reported about the issue to Magento.
We have covered the installation fo following patches but you can install other using the same method:
Refer this awesome spreadsheet to know which patches your Magento needs. This sheet is prepared and maintained by JH.
Contents
Hacker can run the malicious code and try to create one fake admin user with all rights in the Magento database leveraging SQL injections. If you think, your website has been hacked, then please try to find usernames in your database: admin_user and ypwq, as these are the names hackers are using so far.
Why You should fix this as soon as possible?
Check Point researchers recently discovered a critical RCE (remote code execution) vulnerability in the Magento web e-commerce platform that can lead to the complete compromise of any Magento-based store, including credit card information as well as other financial and personal data, affecting nearly two hundred thousand online shops.
Source: http://blog.checkpoint.com/2015/04/20/analyzing-magento-vulnerability/
Magento has released these 2 patches, SUPEE-1533 and SUPEE-5344.
The important thing is now how to install the patches for the Magento website, here is the simplest guide to apply patches on your magento.
There are 3 ways to install patches, either using SSH and the other one is using FTP or cpanel. Some hosting provider don’t provide the SSH access for your plan, but don’t worry you have other option to follow.
Compilation:
Make sure compilation has been disabled in your store before installing patches. If you haven’t disabled the compiler and installed the patch, test everything and run the compiler to again. It needs to run the compiler to take effect of the code of the patch.
I have explained installation of patches with both the ways here:
Follow this instruction to install patch on your store,
<?php print("<PRE>"); passthru("/bin/bash PATCH_SUPEE-5344.sh"); print("</PRE>"); echo "Done"; ?>
Replace the file name in it, upload it in the root and run the file from the browser.
Name should be PATCH_SUPEE-5344.sh or PATCH_SUPEE-1533.sh
You should receive following screen once you run patch.php from the browser,
If you are getting error like this,
“Error! Some required system tools, that are utilized in this sh script, are not installed; Tool (s) “patch” is (are) missed, please install it(them).
That means system tools aren’t installed in your server to run the sh script, you can contact your hosting provider or follow another method.
We have updated the patch files for the older Magento versions:
It is very much recommended to use this patches at your own risk, please take backup of your website. It is highly recommaded to upgrade your Magento version to latest one, you can contact us for the Magento Upgrade Service.
Here is the patch file for Magento version (1.3) : Patch_for_Magento_1.3
Here is the patch file for Magento version (1.4) : Patch_for_Magento_1.4
Here is the patch file for Magento version (1.5) : Patch_for_Magento_1.5
You can install patch with SSH as well. You will need SSH, if you don’t know how to set up SSH, contact your hosting provider.
For .sh file extension
Sh PATCH_SUPEE-5344.sh
Sh PATCH_SUPEE-1533.sh
For .patch file extension:
patch —p0 < patch_file_name.patch
We have uploaded the zip files with already patched files, you will just need to extract and upload It in the root of your Magento.
Patch SUPEE-1533 (Magento 1.7.x.x-1.9.1.0) applied to the following files:
Download the zip from here : SUPEE-1533.zip
Download the zip for Magento (1.6.x.x) : SUPEE_1533_for_1.6.zip
Patch SUPEE-5344 applied to the following files:
Download the zip for Magento (1.8.x.x – 1.9.1.0 ): SUPEE-5344.zip
Download the zip for Magento (1.7.x.x): SUPEE_5344_for_1.7
Download the zip for Magento (1.6.x.x): SUPEE_5344_for_1.6
You can also download these Pre Patched files from GitHub.
NOTE : Please Don’t forget to check the user account for the admin, if you found any malicious user accounts, delete those immediately.
Check your Latest Security Patch status at: http://magento.com/security-patch
Magento released this patch on 14th May, 2015. This Patch stuffs several vulnerabilities, one of which is the possibility the download the customer data allow.
Here is the way to install the patches:
Method 1:
Currently there isn’t any way to verify that SUPEE 5994 installed or not but we are working on our Magento Applied Patches extension so that you can check.
Method 2:
As per our promise, here are zip files for the SUPEE 5994 Patch. You can also download these Pre Patched files from GitHub.
Magento version | SUPEE-5994 |
Magento 1.4.1.0-1.4.1.1 | SUPEE_5994_1.4.1.0_1.4.1.1 |
Magento 1.4.2.0 | SUPEE_5994_1.4.2.0 |
Magento 1.5.1.0 | SUPEE_5994_1.5.1 |
Magento 1.6.2.0 | SUPEE_5994_1.6 |
Magento 1.7.0.2 | SUPEE_5994_1.7.0.2 |
Magento 1.8.1.0 | SUPEE_5994_1.8.1 |
Magento 1.9.1.0-1.9.1.1 | SUPEE_5994_1.9.1 |
You can also check yourself which patches have been installed in your Magento Store with this extension(only if you have installed using SSH or using Patch.php file upload method): https://www.magecomp.com/magento-applied-security-patches.html
Magento Security Patch SUPEE 6285 addresses the following security issues:
Method 1
You can follow the same process as stated above for SUPEE 1533, 5344 nad 5994
Method 2
You can follow the same process as stated above for SUPEE 1533 and 5344
Method 3
Download the zip file for the patch installation. You can also download these Pre Patched files from GitHub.
Magento version | SUPEE-6285 |
Magento 1.9 | SUPEE_6285_Magento_1.9.1_v2 |
Magento 1.9 | SUPEE_6285_Magento_1.9.0.1_v2 |
Magento 1.8 | SUPEE_6285_Magento_1.8.1 |
Magento 1.7 | SUPEE_6285_Magento_1.7.0.2 |
Magento 1.6 | SUPEE_6285_Magento_1.6.2 |
Magento 1.5 | SUPEE_6285_Magento_1.5.1 |
Magento 1.5 | SUPEE_6285_Magento_1.5.0.1 |
Magento 1.4 | SUPEE_6285_Magento_1.4.2 |
Magento 1.4 | SUPEE_6285_Magento_1.4.1.1 |
Method 1
You can follow the same process as stated above for SUPEE 1533, 5344 and 5994
Method 2
You can follow the same process as stated above for SUPEE 1533 and 5344
Method 3
Download the zip file for the patch installation. You can also download these Pre Patched files from GitHub.
Magento version | SUPEE-6482 |
Magento 1.9 | SUPEE_6482_Magento_1.9.2.0 |
Magento 1.9 | SUPEE_6482_Magento_1.9.1.1 |
Magento 1.8 | SUPEE_6482_Magento_1.8.1.0 |
Magento 1.7 | SUPEE_6482_Magento_1.7.0.2 |
Magento 1.61.0, 1.6.2.0 | SUPEE_6482_Magento_1.61.0_1.6.2.0 |
Magento 1.4.2.0,1.5.x,1.6 | SUPEE_6482_Magento_1.4.2.0_1.5.x_1.6 |
As per Magento 1.9.2.1
Magento version | SUPEE-6482 |
Magento 1.9 | SUPEE_6482_Magento_1.9.2.0 |
Magento 1.9 | SUPEE_6482_Magento_1.9.1.1 |
We have moved SUPEE 6788 section to: How to install SUPEE 6788 with or without SSH
We have moved SUPEE 7405 section to: How to install SUPEE 7405 with or without SSH
We have moved SUPEE 7616 section to: How to install SUPEE 7616 with or without SSH
We have moved SUPEE 8788 section to: How to install SUPEE 8788 with or without SSH
We have moved SUPEE 9652 section to: How to install SUPEE 9652 with or without SSH
We have moved SUPEE 9767 section to: How to install SUPEE 9767 with or without SSH
[expand title=”1) I’ve installed the patches as instructed, but the warning still keeps showing when I log into Magento admin panel.“] Warning is just the notification, you can “mark as read” all those messages if you have successfully installed the patches. If you haven’t either follow the blog post, or do contact us, we will help you with the patch installation for FREE [/expand][expand title=”2) I’m on a shared server and my hosting provider does not allow access via SSH or telnet. Is there another way to install security patches?“] We have displayed 2 more methods for the security patch installation, try any one of them. If you know about the FTP, then the File upload method is the best. Make sure you take backup of the files you are overwriting. [/expand]
[expand title=”3) Fatal error: Class ‘Mage_Install_Controller_Router_Install’ not found
[expand title=”4) blank page after installling security patch PATCH_SUPEE-5994“] a. Make sure there is a install.php file at this path app/code/core/Mage/Install/Controller/Router/Install.php
<?php ... define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src'); define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat'); ..
comment out both lines like this:
# define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src'); # define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat');
try again. You will probably be able to login now. Go to your tools, rerun compilation process and when you get a success, go back to your includes/config.php file and uncomment the lines again.
[/expand]
[expand title=”5) Getting: Error! Some required system tools, that are utilized in this sh script, are not installed: Tool(s) patch is(are) missed, please install it(them).“]
[expand title=”6) How can I make sure that SUPEE 1533 and SUPEE 5344 have been installed perfectly?“] You can check your website for vulnerability here,
You can use our Free Magento Applied Patches extension for the verification.
This extension will only show the result if you have installed the patches using SSH or php file method.
[/expand]
[expand title=”7) How can I make sure that SUPEE 5994 has been installed perfectly?“]
There is no perfect tool to analyze for SUPEE 5994 verification but you can check the files which patch have modified,
[expand title=”8. I am getting this error while applying patch? What could be the issue?
The error you are facing is due to the spacing issue in code, we have mentioned this before as well, in patch files, it has been set that at this line, particular code needs to be changed, if patch doesn’t find the code at specified line it throws this error.
Every code line had a CRLF line (empty line) under it. This could be the reason for this error. You will need to find the file and remove this lines between code from files. In short file needs to match exactly what Magento has in its repository for the patch to apply.
Solution: Download the same exact core files for that particular Magento version fresh from the Magento site and replace them with the old core files, the patch will work perfectly.
Or try this one
Run dos2unix command to convert all line endings to UNIX from DOS
Command
~/bash$ dos2unix
For Example : ~/bash$ dos2unix app/code/community/OnTap/Merchandiser/controllers/AdminhtmlController.php
If you have any difficulties with applying the patches please let us know in comments.
Hello Magento Friends, In today’s blog, I will explain How to Add Tooltip in Checkout…
MongoDB is a popular NoSQL database that offers flexibility and scalability when handling modern web…
In NodeJS, callbacks empower developers to execute asynchronous operations like reading files, handling requests, and…
Hello Magento Friends, In today’s blog, we will learn How to Show SKU in Order…
The "Buy Now" and "Add to Cart" buttons serve as the primary call-to-action (CTA) elements…
Hello Magento Friends, In Magento 2, the checkout process allows customers to choose multiple shipping…
View Comments
Have any trouble installing SUPEE_8788_Magento_1.9.2.4 in Magento 1.8.1?
In is not possible now to upgrade to 1.9.2.4.
We install PATCH_SUPEE-7405_CE_1.9.2.0_v1.1-2016-02-23-07-41-47.sh
in Method - 1 but not to applied show this massage
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Adminhtml/Helper/Sales.php
Hunk #1 FAILED at 121.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Adminhtml/Helper/Sales.php.rej
patching file app/code/core/Mage/Core/Model/Config.php
Hunk #1 FAILED at 1642.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Core/Model/Config.php.rej
patching file app/code/core/Mage/Sales/Model/Quote/Item.php
Hunk #1 FAILED at 507.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Sales/Model/Quote/Item.php.rej
patching file lib/Varien/File/Uploader.php
Hunk #1 FAILED at 216.
Hunk #2 FAILED at 538.
2 out of 2 hunks FAILED -- saving rejects to file lib/Varien/File/Uploader.php.rej
Done
Please help me urgent
Please check the FAQ no. 8
Please check our FAQ section for Hunk Failed issue
Hi,
Can i get Security patch 9767 for magento 1.9.1.1
plz
As all ways thanks for everything you guys do. SUPEE-9652 installed and everything is still working smoothly. Cheers guys!
Glad to hear :)
Hi admin where is the exact location to upload the patches via ftp ?
You will need to upload the Patch files in the root of your Magento.
Can you please also write code for revert patches through php script ? as you wrote for apply patches trhough php script ?
"sh patch-file-name.sh" Replace this with "sh patch-file-name.sh -R" in script.
Code is already shown in Method 1
< ?php print("
");echo "Done";
?>
Upload script, upload patch file and run
just shows Done when execute patch.php from the browserbut not showing in applied patches
Can you try checking in magereport?
Hi,
I need your help I have successfully installed SUPEE-8788 version v2 but it's showing 404 error: Page not found. for both frontend and backend for magento version 1.9.2.1
Please contact us from our contact form.
Hi,
I want SUPEE 5344 for magento CE version 1.9.2.1 to install SUPEE 8788
Hi
Can you make SUPEE-8788-V2 available for magneto 1.8.1. i can't seem to see it in the file options on github?
it seems to jump from 1.7 to 1.9?
I know I'm way behind!! But looking to upgrade to 2 shortly.
Thanks
this blog is very useful