SQL injection vulnerability in CmsTop media Edition

Source: Internet
Author: User

SQL injection vulnerability in CmsTop media Edition

The problem occurs in the uc. php interface. The key is the default one, but the UC interface is not correctly enabled.

Because the GPC is disabled in the code, injection may occur.

$ Set = setting ('member'); $ set ['uc _ dbtablepre'] = '''. $ set ['uc _ dbname']. ''. '. $ set ['uc _ dbtablepre']; $ set = array_change_key_case ($ set, CASE_UPPER); foreach ($ set as $ k => $ v) {if (preg_match ('/^ UC _/', $ k) define ($ k, $ v) ;}// check the configuration data in the database. Then set it to a constant. If (! Defined ('in _ uc') {// it seems that the IN_UC constant is not set, so the condition is true if (MAGIC_QUOTES_GPC) {$ get = _ stripslashes ($ get ); // If GPC is enabled, cancel the escape .}

Since the uc interface uses its own database connection, we can just find a function to call.

function renameuser($get, $post) {$uid = $get['uid'];$usernameold = $get['oldusername'];$usernamenew = $get['newusername'];if(!API_RENAMEUSER) {return API_RETURN_FORBIDDEN;}$this->db->query("UPDATE #table_member SET `username`='$usernamenew' WHERE userid='$uid'");return API_RETURN_SUCCEED;}

This is a good idea. You can update the password of any account or inject the echo. (The Administrator is in the same table)

You can also use the synlogin function to log on to any account.

This cms uses a large number of websites.

Solution:
Determine whether uc is enabled.

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.