Discuz! NT 2.x-3.5.2 user control poster SQL injection vulnerability and repair

Source: Internet
Author: User

Ajaxtopicinfo. ascx poster SQL Injection Vulnerability
Arbitrary User Control calling vulnerability combined with ajax. aspx
In the admin/UserControls/ajaxtopicinfo. ascx File

Go to the GetCondition function (WebsiteManage. cs) // 62 rows if (posterlist! = "") {String [] poster = posterlist. split (','); condition = "AND [poster] in ("; string tempposerlist = ""; foreach (string p in poster) {tempposerlist = "'" p "',";} if (tempposerlist! = "") Tempposerlisttempposerlist = tempposerlist. Substring (0, tempposerlist. Length-1); condition = tempposerlist ")";}
Posterlist variables are not filtered and are directly queried by SQL statements, resulting in SQL injection.

Test method:

Http: // localhost: 25594/admin/ajax. aspx? AjaxTemplate = ajaxtopicinfo. ascx & poster = 1 ′)

String ') AND [tid]> = 1 AND [tid] <= 1. The quotation marks are incomplete.

The error message is hidden, but the SQL statement is executed.

 

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.