-
Notifications
You must be signed in to change notification settings - Fork 414
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 is possible on orderBy #1104
Comments
I can not push my branch because I do not have sufficient rights on this repository. So I will explain my proposed fix here. BasePeer:772
|
Probably shouldn't go without saying that one should never trust user input, etc, etc. Still, thank you for sharing this with everyone.
I think the proposed fix isn't quite enough because at BasePeer::753 any further checks are skipped if the order by clause has a single Still, for anyone concerned with this, in MySQL it can be prevented by setting PDO::MYSQL_ATTR_MULTI_STATEMENTS to |
When passing an orderby to the request there is an SQL Injection vulnerability.
For example /orderby/someTable.SOMEPROPERTY%20WAITFOR%20DELAY%20'0:0:10'-- will effectively delay the query.
I have fixed this in the symfony1 fork our company made ages ago. I will make a PR with my proposed fix for this issue here as well
The text was updated successfully, but these errors were encountered: