WordPress site owners have been hit hard this week with a double security whammy including the announcement of a vulnerability in the server OpenSSL system called “Heartbleed” and an exploit in the commonly used JetPack plugin.
OpenSSL Heartbleed Vulnerability
A vulnerability in the OpenSSL library was disclosed on Monday 7th April 2014 in what has been called one of the worst security holes in the Internet in recent history.
The OpenSSL library is used by the Apache and NGINX web servers which power the majority of the Interwebs sites which deliver secure content (HTTPS).
The bug, nicknamed “Heartbleed”, allows an attacker to read the first 64K of server system memory on any servers which have the vulnerability. This could be used to read data such as username, passwords and SSL certificate details.
You should consider any SSL certificates to be compromised and you’ll need to revoke and reissue those certificates.
The bug has been present in OpenSSL since version 1.01 issued in March 2012 and has been successfully patched in version 1.0.1g which was released on April 7th, 2014.
You can read more about the problem, tagged CVE-2014-0160, on the National Vulnerability Database.
What Does This Mean To You?
If you’re website doesn’t use SSL (HTTPS) then there’s not a lot for you to worry about.
If you’re on shared hosting then you won’t have access to your site’s servers. In this case you should contact your hosting provider and ensure they have patched their servers.
For everyone else, you’ll need to update the OpenSSL library on all your servers.
Updating OpenSSL on CentOS 6
We use CentOS for our VPS’ so here’s a quick guide to updating OpenSSL on those machines. If you’re running something other than CentOS, you’ll have to search on how to apply the patch for your particular machine(s).
SSH into your VPS and confirm the version of OpenSSL using the following command
openssl version -a
You’ll get something similar to this:
Pay close attention to the “built on” date. Any builds prior to April 7th, 2014 need to be patched.
To update your system simply use the following command:
CentOS will download all the new OS updates including the OpenSSL patch.
It’s also recommended that you perform a reboot to clear your machine’s memory.
sudo shutdown -r now
You can test to see if your machine has been successfully patched using this website.
Note: please only use this test on servers you own. It could be considered a criminal offence if you try to run the exploit against machines you do not own.
Revoking and Reissuing your SSL Certificates and Keys
OK – so you’ve patched the machine and OpenSSL is secure again. However, as the exploit has been around for a year, you should consider that your SSL certs/keys could have been compromised at any point during that year.
If you’ve purchased SSL certificates from a provider and now patched your OpenSSL, best practice deems that you revoke and reissue all certs. This is called “rekeying”.
The method for rekeying will likely be dependant on your SSL issuer but it should be a relatively simple process.
You’ll need to generate a CSR from WHM in order for the issuer to rekey your certificate. Navigate to SSL / TLS > Generate an SSL Certificate and Signing Request and follow the instructions.
The CSR will have the following format:
—–BEGIN CERTIFICATE REQUEST—–
—–END CERTIFICATE REQUEST—–
Some issuers may not generate the SSL cert straight away, so you’ll have to keep an eye out for it arriving by email.
Once you receive the rekeyed SSL certificate, install it on your server/domain and then remember to restart the web server.
If you want to be ultras secure, change all your system passwords too; cPanel, ftp and email.
Second on our list of patches is to the JetPack plugin.
This is a particularly nasty bug and again it’s been around since 2012 and only just noticed! It allows attackers to publish posts on your site.
The team released a statement on the Jetpack blog.
During an internal security audit, we found a bug that allows an attacker to bypass a site’s access controls and publish posts. This vulnerability could be combined with other attacks to escalate access. This bug has existed since Jetpack 1.9, released in October 2012.
It’s an easy fix. Just update the JetPack plugin to the current patched version (2.9.3 at time of this post).
The JetPack team are proactively trying to apply the patches using the new automatic updater tech which was introduced in WordPress 3.7+
Want to keep your WordPress website secure? Read up on our WordPress Security Best Practices.