HexBrain

Nextcloud · Report #3572848

Group restriction bypass via bearer token in user_oidc (SETTING_RESTRICT_LOGIN_TO_GROUPS not enforced in Backend::getCurrentUserId)

Validstatus
mediumseverity
$150bounty
100upvotes
21 May 2026disclosed

Summary

A security inconsistency was identified in the user_oidc app where group-based login restrictions were enforced in the browser OIDC flow but not in bearer token validation. This could allow users outside whitelisted groups to access the Nextcloud API with a valid bearer token.

Exploitation requires possession of the OAuth client_secret for the OIDC client configuration to exchange an authorization code into a bearer token, limiting practical exploitability to scenarios where an attacker has privileged access to the identity provider infrastructure.

How it was found

The write-up for this report has not been downloaded yet, or the program disclosed it without one. Read it on HackerOne.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original