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 vulnerable. Use placeholder PDO queries. #1

Open
prashnts opened this issue Oct 14, 2016 · 1 comment
Open

SQL injection vulnerable. Use placeholder PDO queries. #1

prashnts opened this issue Oct 14, 2016 · 1 comment

Comments

@prashnts
Copy link
Member

In functions.php, the params are not quoted/escaped. This is a severe issue, vulnerable to most basic SQL injection attacks.

For a demo, try a POST req with $bill_id = "10\"); DROP TABLE purchase_list;--", which, er, deletes the table. :)

Pointers:

PDO looks intimidating at first, I used to drop a mixin for making it slightly less awkward. https://github.com/prashnts/TwoDotSeven/blob/96dba39439cb6cef601a46e89f8a3bca125bedd3/TwoDotSeven/database.php

@Ridhwanluthra
Copy link
Member

it does not accept multiple queries, as in i cannot give anything after ;

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

2 participants