PHP is without a doubt one of the most popular programming languages out there. It is largely used to make dynamic or interactive pages on the web. It is used by a very large amount of websites.
PHP 7 was initially released in 2015 and had several different features that developers and programmers love and continue to love. In addition to that, there are several great online resources to ask PHP-related questions, the most popular of which has a ton of topics posted weekly
While PHP is great and can help many businesses and individuals alike, it isn’t free from its problems. In particular, PHP 7 was hit by a few critical zero-day flaws that were very troublesome to users. With that in mind, this article is going look at not only these aforementioned vulnerabilities but also zero-day vulnerabilities as a whole.
What is a Zero-Day Vulnerability?
Before looking at the specific flaws that PHP 7 experience, we need to look at zero-day flaws or vulnerabilities as a whole. A zero-day vulnerability is a known or unknown flaw in a piece of software, often caused by programming errors, incorrect configurations or many other issues.
It is called a “zero-day” vulnerability because it was just discovered, and the vendor has had “zero days” to create and release a patch. This leaves your software, and everyone using it, potentially vulnerable. As a result, teams need to work quickly to patch up any zero-day flaws. If they don’t, you can be sure hackers or exploiters will be looking to take advantage of it.
Looking at the 3 Zero-Day Vulnerabilities Found in PHP 7
PHP 7 had 3 major zero-day vulnerabilities that could have been major problems for users. These vulnerabilities were:
- CVE-2016-7478—Remote Denial of Service
- CVE-2016-7479—Use-After-Free Code Execution
- CVE-2016-7480—Use of Uninitialized Value Code Execution
Each of these vulnerabilities was related to the use of the unserialize function within PHP. Thankfully, it was reported that no hackers took advantage of these vulnerabilities while they were exploitable. While these vulnerabilities have since been patched in the subsequent release of PHP 7 updates, they are a clear reminder and a cautionary tale for software vendors to always be wary of these types of flaws.
What Were the Dangers If These Weren’t Patched?
So what could have happened if these vulnerabilities weren’t patched and a hacker exploited them? Well, it could have spelled disaster for your site or web page. Some of the exploits would have allowed a hacker to fully take over your server, which could give them full control to do a range of harmful things.
One of the flaws could have also allowed hackers to create a DDoS attack on your site, essentially putting it out of commission. Also, in addition to the actual damage from the hack, several other dangers could present themselves. You could lose a lot of users, be sued and potentially lose millions of dollars as a result of this hack or data breach.
PHP Security Tips
Thankfully, there are many tips and tools out there that can help make your site or application more secure and safe from these sorts of exploits. First of all, you need to be sure to keep your software up to date. Vendors regularly include flaw patches and fixes in new versions, so be sure to update your software, OS and everything else as soon as you can.
Next, you need to be sure to use secure and safe coding practices. Anyone working within your code should have a solid understanding of what they’re working with. If not, an error could occur which could lead to a zero-day vulnerability being discovered too late.
If you’re able to, it’s also a good idea to use tools that can analyze (both statically and dynamically) your code. These will perform checks of your applications and sites to ensure no vulnerabilities are present, or if they are, notify you about them so you can address them as quick as possible.
Hopefully, this article has helped you learn about some of the zero-day flaws found in PHP 7 and how important security is.