Over 78% of All PHP Installs Are Insecure
An anonymous reader writes: Anthony Ferrara, a developer advocate at Google, has published a blog post with some statistics showing the sorry state of affairs for website security involving PHP. After defining a list of secure and supported versions of PHP, he used data from W3Techs to find a rough comparison between the number of secure installs and the number of insecure or outdated installs. After doing some analysis, Ferrara sets the upper bound on secure installs at 21.71%. He adds, "These numbers are optimistic. That's because we're counting all version numbers that are maintained by a distribution as secure, even though not all installs of that version number are going to be from a distribution. 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. Therefore, the real 'secure' number is going to be less than quoted." Ferrara was inspired to dig into the real world stats after another recent discussion of responsible developer practices.
Well, some therapy should help them overcome their insecurities!
22percent of PHP installs are secure???
Red to red, black to black. Switch it on, but stand well back.
Or, as a php dev would say, "Over 20% are secure. We're making progress, folks"
"Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
I would have never recognized him by the name Anthony Ferrara, but ircmaxell immediately rings a bell for me. That dude is smart, kind and helpful in situations on IRC where most people aren't. He took a lot of time helping me get a patch or two submitted and accepted into PHP, in spite of my rudimentary git submissions.
If you're reading this ircmaxell, thanks for the help. The PHP Project is better for it.
I went to eat some animal crackers and the box said, "Do not eat if seal is broken." I opened the box and sure enough..
to assume every web server is hacked already.
Seriously, if you assume this, and code your way in a more secure, 3-tier manner, with a separate, and secured, application server, then you will mitigate all the problems with an insecure web server - well, at least they won't have full unfettered access to your database.
This may mean giving up those "all in one" frameworks people so love (whether its PHP or .NET or any other language), but that can only be a good thing - write an app server with a secure API isn't so hard to do, but will mean your CEO won't have to appear on the news explaining why every user of his site needs to change their password and replace their credit cards.
And why?
Because upgrading PHP breaks shit. It's the old story of backwards compatibility versus security and, inevitably, when you've commissioned a website in a language that you can't program in yourself, you will choose backwards compatibility every time.
Most people do not host their own web services. As such they are at the mercy of their host and what their host needs to run for everyone to be happy.
Every web host I've ever used, personally or professionally, will give you a version of PHP and rarely update it. When they do, they will invariably warn you that your scripts (i.e. website) are probably about to break. Most people in that position do not have the skills and knowledge (or even the tools or hosting capability!) to log in and fix the problem. So it's "we're going to break your website... you have to pay money to fix it".
Hence, there is a pushback every time they do it, and that makes them even more reluctant to suggest to their users that they need to do it again next month.
This is partly a user problem, yes, but it's mainly in the court of the PHP developers. Why does going from PHP 5.3 to 5.5 break SO MUCH without reason? Almost every bulletin board, forum, image gallery or what-have-you you find that runs PHP tells you version it will work on, and has had to issue at least one update that fixes shit that breaks on the newer versions of PHP.
I'm not sure there's another language out there that's quite so undefined and variable when it comes to how things should work and what could change/break in new versions.
Sure, I get that we have to keep everything up-to-date when we're running net-facing servers, but the problems of PHP compatibility and that most web-hosts are scared to upgrade has caused more problems than those old scripts still running. For the most part, they are even worked around so they are still compatible with old PHP's rather than, as should happen, upping the minimum required PHP version and making people get secure throughout.
I think we can safely lay the majority of this problem on the removal of register_globals (something that should never have existed in the first place), magic quotes and safe mode. The last two of which were touted as the lazy-man's security functions so you didn't have to worry about all the fine detail. The rest of the changes in those versions are pretty minor and to-be-expected of a new version of software.
If PHP hadn't done a "PHP isn't safe", "Here, use this hodgepodge of half-assed security feature", "Shit, they're more dangerous than what we were avoiding, remove them!", then maybe they wouldn't be in this mess.
PHP coder since before 4.x. All the bad stuff started happening when people started using redistributed PHP frameworks.
If someone can explain, I don't understand why he is mapping to Linux distros. The W3Techs.com site just give the distribution of various versions of PHP and the percentage of these. I just did a spreadsheet using only the numbers from W3Techs.com and I am getting something like: 27.1% secure and 72.9% unsecure. Not that is a big difference, however it evades me why he is mapping everything to a Linux distro given many distros are missing in his analysis. Any hints?
Achille Talon
Hop!
Student Suspended Over Suspected Use of PHP
not surprising at all
over at LinuxQuestions we had a rash of
H E L P ! ! ! ,or 13,or14 ( fedora 21 is current)
I just installed RHEL6.0 ( unlicensed !!!)
i just installed Fedora 12
and !! NO KIDDING !!!
i just installed RH7.2 ( the rh7.2 from 1996 )
and
i just installed RH9 ( from 2001 )
and a few
"i just installed RHEL4.0 " ( RHEL 7.0 is current)
and this was only in the redhat family
"I don't pitch OpenSUSE Linux to my friends, i let Microsoft do it for me
What he's saying is that the only "secure" version of something is x.x, x.y, z.x. Anything else is "insecure."
Well fuck, what about all those XP installations? Default apache configs? Systems using heartbleed SSL? What about if they're hosted on platforms that aren't current? What about embedded platforms?
Basically, 99% of the internet is insecure.
I mean, come on: 82.27% of perl installs are secure? 77.59% of python installs? Get real.
Seriously, if you assume this, and code your way in a more secure, 3-tier manner, with a separate, and secured, application server, then you will mitigate all the problems with an insecure web server
For PHP web applications that aren't yet quite popular enough to need even a single dedicated server, is there a way to see some of the benefits of "a separate, and secured, application server" without tripling the budget?
This is why it is a good idea to find a solid, trusted, up to date 3rd party repository that is well managed for your OS build.
For you Debian guys and galz out there, check out DotDeb: https://www.dotdeb.org/categor...
And who cares?
I don't have anything that requires security or matters in PHP. I never would, it's just kind of a crappy scripting language to me.
I've PHP that does "Stuff" but none of it is handling private data or writing to databases. At best it's manipulating the data after it's arrived locally and displaying it. Or manipulating it in a form or something before delivering it. I supose it could alter the users intent on send, but I don't care. I'd treat them as untrusted anyways, they're just as likely to be bad actors as some hacker... My users aren't using PHP to login, connect to APIs or anything else that matters... How many people actually use PHP to do anything sensitive? Really, tell me, I don't know. I live in my own microcosm of code so I'm interested if this is a real problem or not.
Our company runs our own servers; we run Ubuntu Linux. Our web sites are PHP. All I know is to run apt-get every Sunday and Ubuntu can update whatever it wants to. These are in-company web sites with login user names and passwords. No e-commerce involved; no public involved.
Am I a security export? Hell no. I've been programming for 45 years. My first language was FORTRAN; my first "personal computer" was a 360/20.. If it takes a security expert to code a program today than our industry is fundamentally flawed.
Why is it that 5.3.10 is listed as the last secure PHP 5.3 when there's many more releases after it?
Cwm, fjord-bank glyphs vext quiz
since most people use web hosting companies some who take time to update their servers there needs to be a dedicated campaign focusing on these guys to shape up.
Hackers tend to focus on the most common tools because a discovered flaw can be used on more instances. If Python or Your Favorite Language were more common, it would probably be a bigger relative target. There is some truth to Security Through Obscurity.
Thus, write your CMS in Brainfuck :-)
Table-ized A.I.
On lots of servers the version number is hidden, so they can't be included in these statistics. My guess is that administrators who know that the version number should be hidden on a production server also update PHP more (or automatically). In that case the conclusion of this post is very doubtful.
I have never heard of a developer held responsible for failures. EEs, CivEs, ChemsEs, etc have to carry malpractice insurance to work.Until they can be sued and held responsible they will not be responsible.
That is why Software Engineering, IMO, does not exist. At best developers are skilled workers but not engineers.
putting the 'B' in LGBTQ+
Or use a distribution which provides updated and supported versions of the tools you need. Red Hat for example provides a base version of PHP if you want something which is stable throughout the entire life cycle of the operating system, but they also provide software collections with a shorter 18 month life cycle if you want a newer version of say PHP.
The problem is that PHP is just one piece in the entire stack. Updating PHP will often require fixing the ini file. Updating the web server will require fixing the web server config files. Updating the database might require fixing PHP's ini and fixing the database config. And if there are any other parts in the mix it will be even worse. What is missing is a simple means to update the entire stack and transfer the customizations in the configuration files. Even experts like Apachefriends all but abandoned the option of upgrades. What the XAMPP stacks are missing is a unified and simple patch/update procedure. The other stacks are not any better as far as security goes, but it is a heckuva lot easier to update/patch IIS/ASP/MSSQL...often on a monthly basis. As soon as folks can't be lazy they tend to not do the necessary work. Make patching XAMPP easier and the problems with unsecure installs will go down.
WordPress and Drupal are listed separately...as if both are not using PHP! Looks as if someone cooked up the stats just to blame PHP. I don't get why PHP is always used as whipping boy often using bogus arguments.
Basically the article assumes that everything the PHP team puts out is "insecure" and that Linux distributors have some magic pixie dust that makes it "secure".
Both assumptions are wrong:
- First, the latest version of PHP will fix all known security vulnerabilities and will be as secure as those patched by Linux distributors.
- Second, just because a distribution "supports" a PHP version does not make it any more secure.
Pure clickbait.