Live data from Hacker News

New PHP Vulnerability:?-s may expose source code for mod_cgi

php.net

61–65 of 65 posts

Re: New PHP Vulnerability:?-s may expose source code for mod_cgi

#61
post #21

As has been mentioned, using CGI for php is quite outdated so it probably doesn't impact that many sites, that said this sort of vulnerability is exactly why you should put all but the minimum front controller PHP in a folder that's outside of the public folder your site is being served from.

Absolutely not. Lighttpd and Nginx both use it, and have recently picked up a lot of popularity because of it. It maybe an old mechanism, but it is fast, which is worth something these days :)

nginx doesn't even have plain CGI support. The SimpleCGI wrapper does not count.

Re: New PHP Vulnerability:?-s may expose source code for mod_cgi

#63

Here's a fun fact...if you try this trick on http://facebook.com/ you get the following source code include_once ' https://www.facebook.com/careers/department?dept=engineering... ;

Clever. I wonder if they have a tradition of having exploit easter eggs like this?

Re: New PHP Vulnerability:?-s may expose source code for mod_cgi

#64

This vulnerability is about as bad as it gets, and my heart stopped while I was reading the intro (it's so trivially simple to compromise a site). Then I reached this sentence, which I felt needed to be bolded and underlined: A large number of sites run PHP as either an Apache module through mod_php or using php-fpm under nginx. Neither of these setups are vulnerable to this. . Thank God. That said, some blackhats ar…

Anyone using a php CGI app could easily have more serious problems than source code disclosure. Those kinds of apps have often been around over a decade with little or no modifications or auditing, because if someone cared enough about the apps to maintain or audit them it's likely they'd have moved to a more performant backend.

[deleted]

Re: New PHP Vulnerability:?-s may expose source code for mod_cgi

#65

This vulnerability is about as bad as it gets, and my heart stopped while I was reading the intro (it's so trivially simple to compromise a site). Then I reached this sentence, which I felt needed to be bolded and underlined: A large number of sites run PHP as either an Apache module through mod_php or using php-fpm under nginx. Neither of these setups are vulnerable to this. . Thank God. That said, some blackhats ar…

Exposing source code is the least of your problems. With creative use of command-line arguments, you can run arbitrary PHP code via any vulnerable URL.

It took me a bit to figure out _how_, but it's nothing obscure or difficult. In fact it relies on _other_ bozotic PHP behavior to work!

Post reply on HN