Skip to content
Access control Disclosed report Beginner CVE-2022-29163

bypass forced password protection via circles app

A user could bypass the administrator's forced password protection for link and email shares by sharing a file with a circle that includes an email address. This allowed the creation of a link that was not password protected despite the policy.

michag86 Follow

Originally disclosed on HackerOne

Bounty$100 Low 3.5 View original
  • Triaged in 15 days
  • Fixed in 5 months
  • Paid in 6 months
  • Disclosed after 7 months

Summary by the program

Advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-pwjv-h37v-c4fx

The report

Summary:

A user can bypass password enforcement for link and email shares by using a circle

Steps To Reproduce:

  1. enable forced passwords for link shares and email shares as administrator in the share settings
  2. as user create a circle and add an e-mail-address
  3. share some file to that circle

Supporting Material/References:

Used version: Nextcloud Version 22.2.3 circles version 22.1.1

Impact

A user can create an link that is not password protected even if this is forced by the administrator.

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

The target is the Nextcloud Circles app (nextcloud/circles), the component that lets users group accounts and share content with a circle instead of individual users. The feature under test is the administrator's forced password protection for link shares and email shares.

The researcher found that a circle can be used to sidestep that enforcement. The reproduction steps are short:

  1. As administrator, enable forced passwords for link shares and email shares in the share settings.
  2. As a user, create a circle and add an e-mail address to it.
  3. Share some file to that circle.

The result, per the impact section, is that a user can create a link that is not password protected even though the administrator has forced password protection. The report records the environment as Nextcloud 22.2.3 with Circles 22.1.1.

The platform lists the report as low severity with a CVSS score of 3.5, classified as a business logic error, with a bounty of 100.00 USD, disclosed on 2022-06-19. The program's summary points to the published advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-pwjv-h37v-c4fx; the report text itself does not describe the fix.

Root cause

The report does not analyse the code, so the cause is only implied. The report does not analyse the code, so the cause is not stated. In other words, the policy is applied per share type at the point where the share is created, rather than as a single check that every share type must pass. When a new share type is added, or when one type is converted into another, the check is simply missing.

Impact

An attacker who is an ordinary authenticated user can produce a share link that the administrator intended to be password protected. Anyone who obtains that link can open the shared file without knowing a password, which removes the main control the administrator put in place for link sharing. The report does not claim anything beyond this: it does not describe brute forcing, enumeration of links, or access to files the user could not otherwise share. The platform rates the report as low severity.

How this kind of bug works

This is a policy enforcement gap, a business logic flaw rather than a memory or injection bug. Applications usually express such policies as a small number of rules: minimum password length, forced expiry, forced password, download permission, and so on. Each rule has to be evaluated on every path that can create or modify a share. Real codebases have many such paths: the main share endpoint, the public link endpoint, batch operations, share conversion, and integrations with apps that create shares on the user's behalf. A rule that is implemented inside one controller, or inside a helper that only some controllers call, will be bypassed by any path that does not call it.

The classic variants are: creating a share of a type the check does not cover; creating a share without the password field and then updating it; converting one share type into another after creation; and letting a second app create the share through its own code. The defence is to centralise the policy in the share manager or a validator that every creation and update path must go through, and to test each share type and each transition against the policy.

How to test for it

  1. Map the share types the product supports: user, group, circle or team, link, email, federated, and any app-provided type. Note which ones the admin policy is supposed to cover.
  2. As an administrator, turn on the strictest policy available (forced password, minimum length, expiry) and confirm with a normal link share that the policy is actually enforced.
  3. As a low-privileged user, create a share through every other type and every route: the UI, the API endpoint for that type, and any integration app. For each, check whether the resulting share has a password and an expiry.
  4. Try transitions: create a share without a password where allowed, then convert it to a protected type; or create a protected share and then change its type. Check the state after each step.
  5. Try omitting the password field entirely, sending an empty value, and sending the field under a different name or in a different content type, to see whether validation is skipped rather than rejected.

A positive result is a share that is reachable by an unauthenticated party and that lacks the control the administrator enforced, confirmed by opening the link in a private browser session. Common false positives: the policy applies only to new shares and not to pre-existing ones; the admin setting was not saved or applies only to a subset of share types by design; the link is protected by another mechanism such as group membership or a token in the URL that the tester already had. Always re-read the product documentation on what the setting is meant to cover before reporting.

How it is fixed

The standard fix is to move the policy check into the central share creation and update logic so that every share type and every transition is validated, and to reject the request rather than silently creating an unprotected share. Where a share type can be converted, the conversion must re-run the same validation. Regression tests should cover each share type and each conversion against the policy. The report does not state which of these was applied here.

Hunting notes

Policy bypasses cluster around features that were added later or that live in separate apps: circles, teams, projects, guest accounts, federated sharing, and any marketplace app that can create shares. Recon signals include a share settings page with several independent toggles, API documentation listing multiple share creation endpoints, and changelogs mentioning new share types. Because the impact is often modest, the report is strongest when it shows the exact administrator setting, the exact user action, and the resulting link opened without a password, ideally with the two accounts clearly separated. State plainly what the attacker gains and avoid inflating it beyond what the reproduction shows.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

Nextcloud is a product for storing and sharing files, a bit like a private version of a cloud drive. One of its features is sharing: you give someone else access to a file or folder. Sharing can happen in several ways, for example by creating a link that anyone can open, or by sending the share to an email address. Nextcloud also has an app called Circles (nextcloud/circles) that lets people group accounts together, so you can share with a whole circle instead of one person at a time.

Administrators of a Nextcloud instance can decide that every link share and every email share must be protected by a password. The idea is simple: even if a link leaks, the person who finds it still needs the password. This report shows that a user could get around that rule by sharing to a circle.

The researcher's reproduction is three steps:

  1. As administrator, enable forced passwords for link shares and email shares in the share settings.
  2. As a user, create a circle and add an e-mail address to it.
  3. Share some file to that circle.

Each step matters. Step 1 sets up the rule the administrator wants enforced. Step 2 creates a circle that contains an email address. Step 3 is the action that produces a share the rule was supposed to cover, but apparently does not.

The result, as the impact section puts it, is that a user can create a link that is not password protected even though the administrator has forced password protection. The report records the environment as Nextcloud 22.2.3 with Circles 22.1.1.

The platform lists the report as low severity with a CVSS score of 3.5, classified as a business logic error, with a bounty of 100.00 USD, disclosed on 2022-06-19. The program's summary points to the published advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-pwjv-h37v-c4fx; the report text itself does not describe the fix.

Root cause

The report does not analyse the code, so the cause is only implied. The report does not analyse the code, so the cause is not stated. In other words, the policy is applied per share type at the point where the share is created, rather than as a single check that every share type must pass. When a new share type is added, or when one type is converted into another, the check is simply missing.

Impact

An attacker who is an ordinary authenticated user can produce a share link that the administrator intended to be password protected. Anyone who obtains that link can open the shared file without knowing a password, which removes the main control the administrator put in place for link sharing. The report does not claim anything beyond this: it does not describe brute forcing, enumeration of links, or access to files the user could not otherwise share. The platform rates the report as low severity.

In general, how this kind of bug works

This is a policy enforcement gap, a business logic flaw rather than a memory or injection bug. Applications usually express such policies as a small number of rules: minimum password length, forced expiry, forced password, download permission, and so on. Each rule has to be evaluated on every path that can create or modify a share. Real codebases have many such paths: the main share endpoint, the public link endpoint, batch operations, share conversion, and integrations with apps that create shares on the user's behalf. A rule that is implemented inside one controller, or inside a helper that only some controllers call, will be bypassed by any path that does not call it.

The classic variants are: creating a share of a type the check does not cover; creating a share without the password field and then updating it; converting one share type into another after creation; and letting a second app create the share through its own code. The defence is to centralise the policy in the share manager or a validator that every creation and update path must go through, and to test each share type and each transition against the policy.

How to test for it

  1. Map the share types the product supports: user, group, circle or team, link, email, federated, and any app-provided type. Note which ones the admin policy is supposed to cover.
  2. As an administrator, turn on the strictest policy available (forced password, minimum length, expiry) and confirm with a normal link share that the policy is actually enforced.
  3. As a low-privileged user, create a share through every other type and every route: the UI, the API endpoint for that type, and any integration app. For each, check whether the resulting share has a password and an expiry.
  4. Try transitions: create a share without a password where allowed, then convert it to a protected type; or create a protected share and then change its type. Check the state after each step.
  5. Try omitting the password field entirely, sending an empty value, and sending the field under a different name or in a different content type, to see whether validation is skipped rather than rejected.

A positive result is a share that is reachable by an unauthenticated party and that lacks the control the administrator enforced, confirmed by opening the link in a private browser session. Common false positives: the policy applies only to new shares and not to pre-existing ones; the admin setting was not saved or applies only to a subset of share types by design; the link is protected by another mechanism such as group membership or a token in the URL that the tester already had. Always re-read the product documentation on what the setting is meant to cover before reporting.

How it is fixed

The standard fix is to move the policy check into the central share creation and update logic so that every share type and every transition is validated, and to reject the request rather than silently creating an unprotected share. Where a share type can be converted, the conversion must re-run the same validation. Regression tests should cover each share type and each conversion against the policy. The report does not state which of these was applied here.

Hunting notes

Policy bypasses cluster around features that were added later or that live in separate apps: circles, teams, projects, guest accounts, federated sharing, and any marketplace app that can create shares. Recon signals include a share settings page with several independent toggles, API documentation listing multiple share creation endpoints, and changelogs mentioning new share types. Because the impact is often modest, the report is strongest when it shows the exact administrator setting, the exact user action, and the resulting link opened without a password, ideally with the two accounts clearly separated. State plainly what the attacker gains and avoid inflating it beyond what the reproduction shows.

Glossary

  • Nextcloud: a self-hosted product for storing and sharing files, similar in purpose to a cloud drive.
  • Circles app: a Nextcloud component that lets users group accounts together and share with the group rather than with individuals.
  • Share: a grant of access to a file or folder, given to a person, a group, a circle, or anyone holding a link.
  • Link share: a share that works through a URL, so anyone who has the link can open it.
  • Email share: a share sent to an email address, where the recipient gets access through that address.
  • Administrator: the person who configures the instance and sets rules for all users.
  • Forced password protection: an administrator setting that requires every link and email share to have a password.
  • Policy: a rule the application is supposed to enforce, such as requiring a password on shares.
  • Business logic error: a flaw in how the application's intended rules are applied, rather than a technical fault such as a crash or memory corruption.
  • Bypass: getting around a rule without breaking it directly, by using a path the rule does not cover.
  • Code path: the sequence of code that runs for a particular action; different actions can take different paths.
  • Controller: the part of an application that receives a request and decides what to do with it.
  • Endpoint: a specific address in an application's interface that accepts a particular kind of request.
  • API: the interface applications use to talk to each other or to a service programmatically.
  • Authenticated user: someone logged in with their own account.
  • Unauthenticated party: someone who is not logged in, for example a visitor opening a public link.
  • Token: a value, often in a URL, that stands in for credentials and grants access to whoever holds it.
  • CVSS score: a standard numeric rating of how serious a vulnerability is.
  • Severity: a label such as low, medium or high that summarises the risk.
  • Bounty: a payment made to a researcher for reporting a valid vulnerability.
  • Disclosure: the point at which a report is made public.
  • False positive: a finding that looks like a vulnerability but is not, because the behaviour is intended or already protected.
  • Regression test: an automated test that checks a fixed behaviour stays fixed.
  • Federated sharing: sharing between separate Nextcloud instances rather than within one.

More by michag86

View all

4 more disclosed reports, best first.

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.