by stickfigure · 1mo ago · 0 comments
The difference is that PHP has a long history of vulnerabilities while platforms like Java don't. And as bad as Log4Shell was, it wasn't a problem with the core runtime. It wasn't even a problem with the most popular logging framework at the time.
I wouldn't downplay this.
They may be rare today but they have historically been very common.
> To the point where they had to ban java applets from the web.
Those are not RCEs, they were sandbox violations. Sandboxing untrusted code is hard and really only javascript engines have pulled it off. Java and Dotnet gave up, and that's fine.
PHP's security failures are not from trying something ambitious. They're from generating web content on a server. These are not comparable.
Some software written in PHP has a long history like that.
PHP itself mostly dont. Tbh runtime itself has fairly stellar track record on security considering it written in C.
Year CVE Vulnerability Exploitation prerequisites
2004 CVE-2004-1019 Memory corruption in unserialize() Application processes untrusted serialized data
2006 CVE-2006-4812 Integer overflow in PHP's memory allocator through unserialize() Untrusted serialized data
2007 CVE-2007-0906 Buffer overflows in bundled PHP modules and string handling Application passes attacker-controlled data
2007 CVE-2007-1286 Integer overflow in unserialize() reference counting Untrusted serialized data
2010 CVE-2010-2225 Use-after-free in SplObjectStorage deserialization Untrusted serialized data
2012 CVE-2012-1823 PHP-CGI argument injection Vulnerable CGI deployment
2014 CVE-2014-8142 Use-after-free in PHP's unserialize() implementation Untrusted serialized data
2015 CVE-2015-0231 Use-after-free in PHP's object deserialization Untrusted serialized data
2015 CVE-2015-2787 Another use-after-free in unserialize() Untrusted serialized data
2016 CVE-2016-10160 Memory corruption in PHP's PHAR extension Application processes crafted PHAR archive
2019 CVE-2019-11043 Buffer underflow in PHP-FPM Particular web-server configuration
2024 CVE-2024-4577 PHP-CGI argument injection on Windows Particular Windows CGI configuration
10 years like thid seem pretty stellar for me considering half of internet runs on PHP.
But yeah since it's inefficient I doubt it used much after 2010 when php-fpm matured and nginx got popular.
I can't say if it was most popular overall, but it (Log4Shell) was a nightmare for many F500 companies.
Merely declaring a transitive dependency didn't mean that the code was executing nor did it mean that user input was actually being logged through those libraries.
Log4j v2 (the vulnerable version) just wasn't that common at the time. Most everyone had moved on to Logback, and Log4j v1 (not vulnerable) was still more popular than v2.
What makes you say that? I know several websites that ran on unpatched PHP 5 versions for over a decade, without a care in the world until now, because there were no known serious vulnerabilities in the interpreter itself.
upgrading php is much easier.
If it was just "everyone take a breath, we've been through something worse with Log4Shell", that would make a lot more sense.