10th October 2016
Risk level: High
CVSS v3 Base Score: 7.4 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N)
CWE: Incorrect Implementation of Authentication Algorithms (CWE-303)
HackerOne report: 148151
Nextcloud includes an optional and not by default enabled SMB authentication component that allows to authenticate users against an SMB server.This backend is implemented in a way that it tries to connect to a SMB server and if that succeeded consider the user logged-in.The backend did not properly take into account SMB servers that any kind of anonymous auth configured. This is the default on SMB servers nowadays and allows an unauthenticated attacker to gain access to an account without valid credentials.Note: The SMB backend is disabled by default and requires manual configuration in the Nextcloud config file. If you have not configured the SMB backend then you're not affected by this vulnerability.The reporter has published a blog post about this issue on their website as well.
The SMB backend is now performing an additional authentication attempt with invalid credentials. If that succeeds as well it assumes that anonymous authentications are enabled and denies the login attempt.
It is recommended that all instances are upgraded to Nextcloud 9.0.54 or 10.0.1.
The Nextcloud team thanks the following people for their research and responsible disclosure of the above advisory: