Skip to content
Access control Disclosed report Beginner

LDAP login possible even though account doesn't match user filter

Nextcloud's LDAP login accepted any valid directory account, even ones excluded by the configured user filter, so users who should have been denied access could still sign in and get an account created. The account was hidden from the admin Users page but still usable.

gvde Follow

Originally disclosed on HackerOne

Informational View original
  • Disclosed after 2.4 years

We have set up a ldap user filter to match only those users in our ldap directory which should get access to nextcloud. User count shows correct number of users as expected and the filter correctly shows only the users we want in an ldapsearch.

The ldap directory contains a lot of other accounts which don't match that filter and which should not get access to nextcloud. However, now we found out that it is possible for any valid user account in the ldap directory to log into nextcloud. The account is set up and login is successful even through the account does not match the filter.

The account won't be listed on the Users page of an nextcloud admin user, thus from that view the account doesn't exist.

I have just tested it with 11.0.1 (centos7, installed from rpms) and I was able to log in with a test account which does not match the user filter...

The original report as published on HackerOne, by gvde. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the login path validated credentials against LDAP without re-applying the configured user filter, so the filter only affected user listing.

What the attacker needed

Nextcloud with LDAP authentication; a valid directory account outside the filter

How it was found

  1. Configure Nextcloud with an LDAP user filter that excludes some directory accounts.
  2. Confirm the filter works in a direct ldapsearch and that the user count is correct.
  3. Attempt to log in with a directory account that does not match the filter.
  4. Observe that the login succeeds and an account is created.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

An administrator set a filter so only certain directory accounts should be allowed. The bug meant accounts outside the filter could still log in with a valid directory password.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.