Dedecms security vulnerability/include/common. inc. php vulnerability solution

Source: Internet
Author: User

Description:

The target has the global variable overwrite vulnerability.


1. Affected versions: DEDECMS 5.7, 5.6, and 5.5.
2. Vulnerability file/include/common. inc. php
3. The global variable initialization vulnerability of DEDECMS allows you to overwrite any global variable.

Hazards:

1. Hackers can use this vulnerability to redefine database connections.
2. Attackers can exploit this vulnerability to initiate unauthorized operations and directly write webshell backdoors.


Temporary solution:

In/include/common. inc. php
Find the code for registering the variable

The code is as follows: Copy code
Foreach (Array ('_ get',' _ post', '_ COOKIE') as $ _ request)
{
Foreach ($ _ request as $ _ k = >$ _ v) $ {$ _ k} = _ RunMagicQuotes ($ _ v );
}

Change

The code is as follows: Copy code
Foreach (Array ('_ get',' _ post', '_ COOKIE') as $ _ request)
{
Foreach ($ _ request as $ _ k => $ _ v ){
If (strlen ($ _ k)> 0 & eregi ('^ (cfg _ | GLOBALS)', $ _ k )){
Exit ('request var not allow! ');
                   }
$ {$ _ K} = _ RunMagicQuotes ($ _ v );
    }
}

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.