Skip to content

User model login endpoint: security issue with possible query injection #4195

@gabjauf

Description

@gabjauf

Hello Loopback!

I found some kind of vulnerability on POST /Users/login route from the default User model:

Description/Steps to reproduce

Send the following to /Users/login as credentials

{
	"email": {"neq": "foo" },
	"password": "anything you want"
}

When inspecting the resulting user here

, 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

Expected result

We would expect the email to be forced as a string.

Feel free to reach me if my description is unclear 😄

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions