As PHP Group Patches High-Risk Bugs, 62% of Sites Still Use PHP 5 (threatpost.com)
America's Multi-State Information Sharing & Analysis Center is operated in collaboration with its Department of Homeland Security's Office of Cybersecurity and Communications -- and they've got some bad news.
MS-ISAC released an advisory warning government agencies, businesses, and home users of multiple high-risk security issues in PHP that can allow attackers to execute arbitrary code. Furthermore, if the PHP vulnerabilities are not successfully exploited, attackers could still induce a denial-of-service condition rendering the probed servers unusable... The PHP Group has issued fixes in the PHP 7.1.23 and 7.2.11 releases for all the high-risk bugs that could lead to DoS and arbitrary code execution in all vulnerable PHP 7.1 and 7.2 versions before these latest updates.
But meanwhile, Threatpost reported this week that 62% of the world's web sites are still running PHP version 5 -- even though its end of life is December 31st. "The deadlines will not be extended, and it is critical that PHP-based websites are upgraded to ensure that security support is provided," warned a recent CERT notice.
So far Drupal is the only CMS posting an official notice requiring upgrades to PHP 7 (by March, three months after the PHP 5.6's end of life deadline). Threatpost notes that "There has been no such notice from WordPress or Joomla."
But meanwhile, Threatpost reported this week that 62% of the world's web sites are still running PHP version 5 -- even though its end of life is December 31st. "The deadlines will not be extended, and it is critical that PHP-based websites are upgraded to ensure that security support is provided," warned a recent CERT notice.
So far Drupal is the only CMS posting an official notice requiring upgrades to PHP 7 (by March, three months after the PHP 5.6's end of life deadline). Threatpost notes that "There has been no such notice from WordPress or Joomla."
Was version 6 utterly shite, or can't they even count?
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Lots of enterprises rely on RHEL 7 / CentOS 7, and those are currently shipping PHP 5.4.16.
#DeleteChrome
Besides, normally even numbers are used for stable releases. Why would PHP ever be considered dependable or trustworthy as a stable runtime?
Except the warnings of impending deprecation have been around for a while. For example, the old mysql family of functions (replaced w/ mysqli and/or PDO) started throwing E_DEPRECATED in PHP 5.5 which was released in mid 2013.
Don't blame me, I voted for Kodos
Everyone is making it sound like PHP 5.6 is some ancient piece of cruft that everyone has had PLENTY of time to upgrade. In fact, after looking it up, it's only about four years old. That surprised me. It's at end of life already?
Since when is "move fast and break things" a winning strategy for a server-side scripting language which runs much of the world's internet infrastructure? Shouldn't the "deadline will not be extended" attitude perhaps be re-evaluated in light of reality?
We've seen this happen before, of course. Language developers often seem to underestimate how long it takes infrastructure to migrate to newer, incompatible versions of a language. For instance, the Python 2.7/3.x split, which occurred a *decade* ago, is still causing headaches on occasion. At least the Python devs had the good sense to support 2.7 until 2020. I'm going to bet that another four years from now, you'll still see a significant number of sites still using PHP 5.6, official support or not.
Irony: Agile development has too much intertia to be abandoned now.
Replacing stuff from 5.x that doesn't work is nigh trivial. Then again, if you did your homework and didn't code crap, 5.x is perfectly safe.
Of course we all know that PHP is the favorite PL of many people who can't programm, so YMMV.
We suffer more in our imagination than in reality. - Seneca
There is a *lot* of code out there that does questionable stuff in PHP. Stuff that approximately works in PHP 5.6 but fails hard in PHP 7. A large amount of it is relying on things that were deprecated way before PHP 5.6 was even considered as a possibility. A lot of that code is non-trivial so it isn't a quick fix to update it, or worse, is orphaned and there is nobody to update it.
Even worse, a large fraction of it is on sites who don't have a programmer. It exists in unmaintained modules or add-ons to some framework or other that is, itself, often never upgraded. At $dayjob, I've lost count of the number of web sites that get defaced because someone bought a web site from $random_web_developer who used $framework and then never did any maintenance. I mean, people still expect a web site to be "fire and forget", especially if it's a simple brochure style site, and don't understand why they should have to put resources into maintaining it. And they're not wrong, either. These are the vast majority of the sites I can't force-upgrade to PHP 7 without having the customers simply cancel their accounts and not pay their outstanding bills. (Eventually I'll have to, but not today.)
On the other hand, I had almost no issues running PHP code I wrote on PHP 7. But that's probably because I don't overcomplicated the code with eleventy thousand classes, namespaces, autoloading classes, "Composer", or any other fancy gimmick that is all the rage today. The issues I did have tended to be due to code that really shouldn't have worked in the first place, or actually wasn't working properly even on PHP 5.6.
If it works in theory, try something else in practice.
Enjoy Fractal, Hardly, and a synthesis of the two by analogy to Douglas Crockford's JavaScript: The Good Parts
Your application may well work with PHP 7.x, or there may be a newer version of it that does work with the newer version. That is unless you have home grown code, or must run an older version.
If you are running Debian or Ubuntu, you can upgrade PHP to 7.2, using the following commands:
This works on Ubuntu 16.04 LTS, if you need to stay on that, and not having to upgrade to 18.04 LTS. The former is supported for a few more years.
2bits.com, Inc: Drupal, WordPress, and LAMP performance tuning.
At least the MySQL stuff has a valid reason. The old functions were hard to use in ways that didn't introduce security bugs. Non-parameterized SQL queries are one of the most common causes of security holes, largely because they're really hard to get right. I'm all in favor of killing them. With fire.
It's the other thirteen pages of changes from PHP 5 to PHP 7 that are the problem — little, subtle things where variables get populated in the opposite order depending on what version of PHP you're running, or the order of operations changes in ways that require new parentheses. These sorts of changes are hard to spot in large code bases, and could potentially result in unexplained failures. If your code doesn't have amazing unit test coverage (which PHP usually doesn't)... good luck.
Check out my sci-fi/humor trilogy at PatriotsBooks.
a publicly exposed language which has always had security issues,
clever websites - not
Go well
It still looks like a clusterfuck to me, although maybe slightly more unfucked than the last one.
Regrettably $CLUSTER_FUCK is a superglobal.
Joomla has been urging people to update to PHP 7 for quite awhile now. There's a big message right on the admin dashboard.
It might be, but the major reason for people not upgrading is that there are breaking changes between the major versions of php.
So you can't just drop in a new version because then something on your server breaks. And anyone that knows that piece of code has long ago left for greener pastures. It's usually some medium sized package that just do the job and is key for the business.
Php is also a headache from a test perspective since you don't find the broken stuff until you try to access it. Some of it may only be accessed once per year and only during new year break by an automatic script.
Things like that makes me dislike script based solutions.
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
Then you need to find a programmer that can understand how to fix that. It's often the case that the person who wrote it has exited the company a long time ago.
That's why breaking backwards compatibility is bad, especially on script based languages.
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
Is that a reference to magic quotes? :)
Why UNIX?
It's open source, why not cherry pick the bits you want, and name it something else?
Why UNIX?
Yes, php, a language that built sql injection vulnerabilities into the API.
At least they know what query parameters are now. The programmer wasn't entirely at fault, up until PDO anyway.
Why UNIX?
At least they know what query parameters are now. The programmer wasn't entirely at fault, up until PDO anyway.
Because there is no way to sanitise the inputs yourself, right? Because programmers are expected to quickly put together whatever, by not caring about the consequences at all and, in case of problems, complaining about the programming language? Because software developers are so lowly-qualified professionals and their expertise is so extremely unrelated to properly understanding/having full control on the given situation that they will fail to take care of even the slightest detail which the given tool (AKA programming language) hasn't made completely idiot-proof? LOL.
No. The only responsible for any SQL injection or any other problem provoked by an inadequate algorithm, usage of the programming language or poor understanding of whatever scenario is the programmer. Full stop. The fact that the whole programming process might be very complex, demanding, error-prone and that the given framework should ideally provide friendly ways to ease the more problematic parts is a different story. But a diligent-enough developer facing whatever implementation by relying on whatever resources should properly understand the conditions and adapt his coding behaviour accordingly. He can complain about having to pay more attention, wasting more time or preferring a different platform. But, unless in exceptional cases (unknown bug in the programming language), whatever problem in the generated piece of software will be his fault, either directly (limited experience, bad personal decisions, bad understanding of the problem/environment) or indirectly (having to comply with ridiculous constraints).
BTW, I have written many algorithms connecting to different databases, most of the times by sanitising the inputs myself rather via parametrised queries (not recommending to do so to everyone though). In fact, this is just a small subset of all the implementations where I have had to make sure that the inputs meet the expectations of the corresponding algorithm. I have never had any kind of input-sanitation-related (security) problem and, in case of ever having it, I would certainly be my fault.
Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
It should be noted that CentOS 6 notably (and RH6 I would assume) by default still ship with PHP 5 (5.6 by now I think?) To get a newer version, you must add a different repo as I don't think PHP7+ is even in EPEL. I can easily see why the number is so high, not to mention anyone crazy enough to run PHP on IIS where it most likely will just tick to the end of its useful life instead of going through an upgrade process.
I think a large percentage of that is the CentOS/RHEL that is still on 5.x which isn't as awful as it sounds because Redhat will ensure security fixes for 5.x as long as they continue to distribute it. They have a history of backporting fixes to ensure stable versions for a very long time. But I am very surprised by how long they've stayed at PHP 5.x, feels like more focus was placed on python 3 than php 7, and for good reason.
poor understanding of whatever scenario is the programmer
This. Shame with PHP though that between versions magic quotes crept in, so legacy programs that had to work around lack of parameters then had to be adapted to cope with systems where a new layer was introduced, otherwise things became double escaped.
Why UNIX?
There are tools to check your code to see if it will work with newer versions of PHP, like PHPCompatibility.
Any testing PHP is easy : you can write unit tests, integration tests, etc.
The problem is still that you have to get someone that can care for the code. It's a common problem - hire someone to do a specific job and then when that person leaves there's just something that works, but it happens to block upgrades also for other applications.
Just come out to the reality and see - the world is full of small solutions that happens to be blocking upgrades of larger application suites. And the management of the companies don't want to upgrade "because it works" and that they don't want to spend money on "unnecessary upgrades", sometimes so that they can raise the share values or get a new car.
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
If enough people don't want to be force-fed 7, it could happen.
Table-ized A.I.
Oh believe me, I know ;-)
Managers don't understand that any piece of software needs maintenance...