-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Eloquents attach association doesn't prevent sql injection #31607
Comments
@mantas-done Can you test by pass role ids in request Thanks for checking |
@mantas-done , are you test on Laravel Framework or Lumen? what laravel version you test? I'm using : |
Laravel 5.8 isn't supported anymore (from yesterday). https://laravel.com/docs/master/releases |
@mantas-done , okay, I got it thanks |
When you say it crashed, what error did it give? |
@rs-sliske |
that error doesnt indicate sql injection, it is just that you dont have any validation to ensure that the values are correct type/size |
When
// inject single quote in array
$partIds = ["1'", "2'"];
$model->cars()->attach($partIds);
Query will crash, so vulnerabilities will able to attack by sql injection
The text was updated successfully, but these errors were encountered: