Default credentials
Vulnerability
Source: https://swarm.ptsecurity.com/rce-cockpit-cms/
Extracting password reset tokens
Cockpit, like many other web applications, allows resetting account passwords.
We discovered two methods that are vulnerable to NoSQL injection and allow obtaining the password reset token for any user.
NoSQL injection in /auth/check (CVE-2020-35846)
Using the $eq operator
The
$eqoperator matches documents where the value of a field equals the specified value.
For example, you can use it to bruteforce names with a dictionary.
The condition is met: a user with the name admin has been found
The condition is NOT met: no user with the name admini has been found
NoSQL injection in /auth/requestreset
[requestreset](https://github.com/agentejo/cockpit/blob/0.11.1/modules/Cockpit/Controller/Auth.php#L82) method of the Auth controller responsible for creating the password reset token: