PHP PATH_INFO Vulnerability

Source: Internet
Author: User

From Chinadu's Blog

PS: in fact, this vulnerability was revealed 10 years ago, and now it has been spread. It is estimated that it will cause a small revolution, and the source code of many major websites will be circulated.
PHP PATH_INFO Vulnerability

A website created using nginx + php may be hacked as long as images can be uploaded. Until the early morning of June 5.21, nginx has not released a patch to fix the vulnerability. Some websites have been hacked, administrator quick fix!

Test method:

Nginx server uploads images to access the image address, followed by 4shell. php

Example: <A href = "http://up.2cto.com/Article/201005/20100528102421897.jpg/4shell.php

You can select one of the three temporary repair methods.

1. Set php. ini:

Cgi. fix_pathinfo is 0

Restart php. It is the most convenient, but you need to evaluate the impact of modification settings.

2. Add the following content to the nginx vhost configuration and restart nginx. It is also convenient when there are few vhosts.

If ($ fastcgi_script_name ~ .. */. * Php ){
Return 403;
}

3. Do not upload directories to interpret PHP programs. Webserver does not need to be moved. If there are many vhosts and servers, the difficulty will increase sharply in the short term. We recommend that you use webserver when there are few vhosts and servers.
Category: Technical Article tags: 0day, nginx, PHP
Related Articles
Automatically add a slash to the nginx directory
Shopex V4.8.4 V4.8.5 0-day kill
PDF latest 0-day
Firefox 3.6 0-day is supplemented
DedeCms v5.5 0day
Rising's local privilege to kill and use code
Internet Explorer 0-day attack code has completely leaked WebSense and issued a security warning
Php. ini file A-level abnormal configuration
Gnuboard 0day & Exp
New cloud 4.0 latest 0day

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.