Hello Loopback!
I found some kind of vulnerability on POST /Users/login route from the default User model:
Send the following to /Users/login as credentials
{
"email": {"neq": "foo" },
"password": "anything you want"
}
When inspecting the resulting user here https://github.com/strongloop/loopback/blob/4b3a3a347c9176f1a86b00d229fc942bdc60c794/common/models/user.js#L254 , this results in the first user in the database being returned, which means we now only need to find the password.
Found in loopback v3.25.1
We would expect the email to be forced as a string.
Feel free to reach me if my description is unclear 馃槃
We may also use the "regexp" functionality to test multiple users without having to know their exact email:
{
"email": {"regexp": "^a" },
"password": "anything you want"
}
@gabjauf I tried both the payloads, I am getting 401. Can you elaborate the steps?
Oh, I got what you mean. Taking a look. Thanks for reporting.
@hacksparrow I was seeing a 401 as well - could you elaborate on 'I got what you mean'?
The fix has been published last week in [email protected].
Great works guys, thanks 馃憤
Most helpful comment
The fix has been published last week in
[email protected].