Vulnerability and repair of the most popular group buying program

Source: Internet
Author: User

This vulnerability is very serious and directly affects the order information of the website. It was found in the commercial version CV1.6.1490.

Cause:

When the user enters the order page (/team/buy. php? <Input type = "hidden" name = "id" value = "{$ order [id]}"/>, this $ order [id] is used to store the user's previous payment order id, which is the SQL Injection portal.

Criteria 1:

Modify <input type = "hidden" name = "id" value = "any order id"/> and submit the form, the order information of this order will overwrite the order information of the corresponding order id, but the payment status will not be changed. If you place an order before the group purchase is successful, the coupon information will be sent to the user.

Criteria 2:

Modify <input type = "hidden" name = "id" value = "SQL statement"/> to cause dangerous SQL injection.

Solution:

There is a sentence about line 1 (Row 3) of team/buy. php (or wap/buy. php ).

If ($ flag = $ table-> Update ($ insert), you can change Update to Insert as an emergency solution.

Because $ table variable uses $ table = new Table (order, $ _ POST); for initialization, once $ _ POST [id] is not empty, the value is updated to the corresponding record as the primary key query.

In addition, the DB Update method in DB. class. php also has a vulnerability, which makes SQL Injection possible. There are around 284th rows.

The $ id value in else $ condition = "'$ pkname' = $ id"; is not processed, so that the value in input is directly transferred to the SQL statement, which is very dangerous.

Solution:

Filter the above parameters and wait for official upgrade

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.