6 ms·
PHP Install Statistics
- inglor 12y agoIt would be interesting to know what percent of these vulnerabilities are remote.
- duskwuff 12y agoDepends on what the application exposes. For instance, the recent unserialize() vulnerability is remote if the application deserializes data from the user. This is a bad idea, but a lot of applications do it anyway.
- wvenable 12y agoDeserializing data from the user is itself a security vulnerability, in my opinion. Given that we have not had a mass outbreak of PHP vulnerabilities, I imagine the impact here is low. I wouldn't be surprised is the Linux distributions that these sites run on have just as many vulnerabilities if you use the same criteria as presented here.
- trebor 12y agoAn unserialize attack would require intimate knowledge of the operating codebase, as well as an encoded object (only objects can be exploited this way) that could be configured to execute an attack via its constructor or __set_state() method. Or, installing a backdoor through another CVE to create the opportunity for just this kind of attack. It's complex, but not unknown. I'm not aware of any major applications (WordPress, Drupal, etc) that deserialize user input. That's not to say a plugin or theme might be unsafe, but not in the core code that I've seen.
- deleted 12y ago[deleted]
- eikenberry 12y agoDebian wheezy originally shipped with 5.4.4 but now defaults to 5.4.34 through a security update made on 2014-11-05.
- lstamour 12y agoWhich would then adjust this post's definition of "Insecure 5.4" to 72.2%. from 89.6%.
- spacefight 12y agoBut 5.4.36 came out Dec 18th.
- mappu 12y agoCame here to post this. I was actually upset about that change, it caused some weird compatibility issues in my application, and i had a hard time finding debian's rationale.
- smsm42 12y agoIt would be excellent if you reported the BC break (provided you figure it out and it's PHP fault) to bugs.php.net and also to the PHP internals list (internals@lists.php.net). Unless it's listed in UPGRADING file for your version, BC break in advanced version should not happen and is a problem. This happens from time to time (e.g. we had to break some hacks using unserialize() on non-serialized strings because otherwise it created security hole) but it's pretty rare.
- arenaninja 12y agoAnd if I'm not mistaken, CentOS 5.10 shipped with 5.3.3, and Ubuntu 12.04 Server ships with 5.3.10
- xyby 12y agoLooks like his definition of "has a security vulnuerability" is "is not the latest release". Does every release fix security vulnuerabilities?
- Rygu 12y agoPHP minor releases are bug and security fixes. But as long as the latest minor release fixed a vulnerability, in 99% of the cases, you can assume that all previous versions contain that vulnerability. (I know, I know, regressions do happen)
- xyby 12y agoYes. But does every minor release fix bugs AND security holes? If some only fix bugs, the equation "not newest = insecure" is wrong.
- ircmaxell 12y agoI counted any point release since the latest security release as secure. So for PHP's 5.6 line, only 5.6.4 is secure, since 5.6.4 is a security release. I'm currently crunching numbers for other platforms. For example, Nginx's last security release (for 1.7) was 1.7.5, so 1.7.5 -> 1.7.9 are all considered security.
- lstamour 12y agoYou can see a list of vulnerable PHP versions here: http://www.cvedetails.com/version-list/74/128/1/PHP-PHP.html http://www.cvedetails.com/version-list/74/128/1/PHP-PHP.html Note that this list refers to those versions as released, not as OS vendors may have patched them.
- TylerE 12y agoIt's PHP. Fingers in the dike. But don't take my word for it... http://php.net/ChangeLog-5.php http://php.net/ChangeLog-5.php At least 90% of releases have a bugfix with an associated CVE vulnerability.
- smsm42 12y ago
- chronid 12y agoI don't find it really that surprising. Some shared hosts run very old/outdated PHP versions (at least one I know still uses 5.2). At the same time many, many many linux servers are never updated after the first installation...
- deleted 12y ago[deleted]
- deleted 12y ago[deleted]
- pfg 12y agoThat's been taken into account (though apparently not correctly, see eikenberry's comment below). All PHP versions shipped with currently supported releases of Debian, Ubuntu and CentOS were considered safe.
- spacefight 12y agoWell, 14.04 is still showing 5.5.9 built Oct 29 2014. Am I am wrong to assume that the newest fixes (CVE-2014-8142) are not in there yet?
- gdulli 12y agoIn the first section "What Is A Secure And Supported Version?": "We'll also count [as secure] those [known insecure versions] that are maintained by Linux distributions in supported releases" They consider (for example) any 5.4.4 install secure, even though it's a known insecure version. They're admittedly over-counting the secure installs by assuming any 5.4.4 version is the version maintained by Debian with security fixes back-ported. "So 21.71% is an upper bound on the number of secure installs."
- eyeinthepyramid 12y agoI think it's safe to say that 100% of PHP installs have a security vulnerability of some kind, though that doesn't mean the vulnerabilities are known or exploitable.
- Osiris 12y agoI think it's safe to say that 100% of all software and hardware have a security vulnerability of some kind, though that doesn't mean the vulnerabilities are known or exploitable.
- eyeinthepyramid 12y agoExactly. Being on the bleeding edge doesn't mean that people aren't vulnerable, it just means that people don't know how vulnerable they are.
- tracker1 12y agoWhich is precisely why I use carrier pigeons from my secure locations to use the internet... All disks in and out are block-level scanned and analysed before loaded at the application level, and USB ports are hot glued closed, along with peripherals hot-glued in place.
- callum85 12y agoBut it does make you much less vulnerable, because you're only vulnerable to the tiny proportion of attackers who have discovered a zero day exploit.
- r0s 12y agoThat's true of older versions with security updates too.
- smsm42 12y agoThis is as useful as coming to a hospital and telling the doctors "Why waste your time, guys? Everybody is going to die anyway!". Close to 100% of software is faulty and vulnerable, yet there's a difference between running software with known published issues and running software without them.
- deanclatworthy 12y agoI get the point of this article but a lot of the vulnerabilities require an attack vector in the form of PHP code written in a certain way. Therefore the number of vulnerable servers is actually far far lower than what's stated here.
- achillean 12y agoSearching Shodan I get the following numbers, which indicate that roughly 56% of PHP instances are vulnerable to some degree. Total number of servers running PHP: 7,320,803 https://www.shodan.io/search?query=php+port%3A80%2C443%2C8080%2C8443+after%3A01%2F10%2F2014 https://www.shodan.io/search?query=php+port%3A80%2C443%2C808... Servers running vulnerable PHP versions: 4,111,345 https://www.shodan.io/search?query=php+port%3A80%2C443%2C8080%2C8443+after%3A01%2F10%2F2014+-5.6.4+-5.5.20+-5.5.12+-5.5.9+-5.4.36+-5.4.16+-5.4.4+-5.3.10+-5.3.3+-5.3.2+-5.1.6 https://www.shodan.io/search?query=php+port%3A80%2C443%2C808...
- trebor 12y agoThis drives me crazy: we have a billion-dollar business as a client who self-hosts their website, and it's running on PHP 5.3.3 on a way outdated version of CentOS. It's not as if they can't afford to upgrade, it's that they won't. We have other clients who won't leave their host, and we're locked to PHP 5.2 to try to "write a modern application" in. The bleeding edge may not be safe, but staying locked to an ancient copy of PHP 5 that was end-of-lifed years ago is not a smart idea.
- gdulli 12y agoPHP has thrived due to the mindset of wanting to get pages on the web with the least amount of effort to configure or understand the stack. It's what I've always seen people cite as the reason for adopting PHP. The language isn't simple, it's full of inconsistency, but the deployment is simple, the setup is simple with default Apache and mod_php, the 1:1 correspondence between web pages and files on the filesystem is simple. It should be expected that the same mindset would lead to unpatched servers and inattention to the nuances of the stack.
- trebor 12y agoActually, this company has their own internal development team that doesn't use PHP. They also employ full-time sysadmins. The only reason they used PHP is because they wanted to use a very well known CMS. We were explicitly told to conform to their server specs with our vagrant box to ensure compatibility, etc. So PHP was adopted to support the CMS, and I guess their sysadmin never bothered to upgrade the server. I wouldn't the cause of this unpatched server to inattention. More like bureaucracy and a bad case of "too many cooks in the kitchen".
- benjarrell 12y agoSpeaking as sysadmin, I have inherited situations similar to what you describe. It could be laziness, but I have also encountered program/project managers that put so many obstacles that it makes you throw your hands up. Having a manager that will back you up makes difference. I've come to the conclusion that inertia is the most powerful force in business.
- smsm42 12y agoCouple of useful links for those wanting to know the timelines: Supported versions of PHP with their timelines: http://php.net/supported-versions.php http://php.net/supported-versions.php Unsupported versions of PHP with EOL dates http://php.net/eol.php http://php.net/eol.php
- jrochkind1 12y ago> Just because 5.3.3 is maintained by CentOS and Debian doesn't mean that every install of 5.3.3 is maintained. There will be a small percentage of installs that are from-source. So is it just me, or is this a total release management failure that there can be multiple different things called "PHP 5.3.3" (or any other version number), which behave differently, some of which have security vulnerabilities and some don't. If you want to know if you are vulnerable or not, knowing you have "PHP 5.3.3" is not enough -- I'm not even sure how you'd tell if you had a patched version or a non-patched version, other than testing it for vulnerability. Something seems horribly wrong here, no?
- kalleboo 12y agoThis applies to pretty much every popular package in a modern distro. I'm not running bash 4.1.2 (which was vulnerable to shellshock). I'm running bash-4.1.2-15.el6_5.2 (CentOS/Red Hat's patched version). It's quicker for distros to backport specific security fixes than to test all the compatibility implications of updating the whole package to the latest version.
- ircmaxell 12y ago> Something seems horribly wrong here, no? Yes. The distributions are effectively forking these versions, and keeping the same version numbers. Leading to some REALLY awkward problems: https://github.com/ircmaxell/password_compat/issues/10 https://github.com/ircmaxell/password_compat/issues/10 However, it's a tradeoff. It hurts some, helps others. After all, I'd rather have someone get security fixes than nothing...
- vacri 12y agoIt's not as bad as Ruby in Debian, which has the patch version number in the package name. For a while there, 'ruby1.9.1' was version 1.9.3...
- mmaunder 12y agoProbably more useful to focus on remote vulnerabilities that matter like CVE-2012-0830 which affected 5.3.9 of which according to the post 0.14% run. Also many bugs are highly config dependent like CVE-2012-1823 which is serious but only affects apache with a specific config. So counting a version increment to indicate level of vulnerability - you probably need to add to the survey to get a real indication of the level of vulnerability out there. However, it's interesting data of what's out there so thanks to the author for that. Most of the infections we see are default installations that haven't been configured and a bot raced in and infected. Or old PHP apps, themes, plugins or components like thumbnailers that were the vector. Targeting PHP itself is quite rare because there are so many vectors via the PHP applications themselves that it's not needed if you just want to own a few thousand boxes for your botnet.
- eblah 12y agoI've been a PHP developer for years, and recently switched jobs from a place where we were proactive in ALWAYS upgrading to the bleeding edge PHP, MySQL and, when possible, CentOS version. Now I'm at a place that has VERY loosely managed code where they virtually cannot upgrade some sites without a rewrite. They're on an old version of PHP 5.2 and MySQL 5.0. I'm doing all I can to get everyone there to understand the issues with legacy software, but it's a tough battle. Thankfully, I've got new code and features running the latest PHP and MySQL versions, it'll be several (many) years until all of it's managed enough to be upgradable. I can also say I've always thought the PHP complaints were unfounded -- no real company doesn't understand OOP, datatypes, etc. Yeah... I completely understand now. It's a fun challenge putting good, solid standards in place and moving a horrid codebase into a great one, though.
- arenaninja 12y agoSo far I've only worked with companies with no upgrade path without rewrite. Luckily I'm the most experienced dev with my current employer, so that may soon change
- sebastianavina 12y agoI readed the title, and expected an article about installing the Statistics package for PHP.