Skip to content
Access control Disclosed report Beginner CVE-2023-48304

Enabling Birthday Contact to any user

A low-privileged user could turn on the Birthday Contacts calendar feature for any other account, including administrators, by changing the user identifier in a calendar request. This let an attacker alter another user's calendar settings without permission.

nvz Follow

Originally disclosed on HackerOne

Medium 4.3 View original
  • Triaged in 9 hours
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 3 months

Summary by the program

Security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-8jwv-c8c8-9fr3

The report

Summary:

Was able to enable Birthday Contacts any User, Admin, SuperAdmin. from a low privileged user.

Steps To Reproduce:

  • Navigate to Calendar.
  • At the very bottom find calendar settings
  • Click on Enable Birthday Contacts
  • Intercept the following request
POST /remote.php/dav/calendars/{userId}

<x3:enable-birthday-calendar xmlns:x3="http://nextcloud.com/ns"/>

Impact

Users with low privileges enable the "Birthday Contacts" feature for any user, including Admins and SuperAdmins, within the Nextcloud application. By following a simple set of steps, an attacker could navigate to the Calendar section, access the calendar settings, enable the "Birthday Contacts" feature, and intercept a specific request to achieve this unauthorized action.

The original report as published on HackerOne, by nvz. 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. 5 min read.

Context

Nextcloud is a self-hosted collaboration platform, and its Calendar app is one of the components users interact with most. Among the calendar settings there is a feature called "Birthday Contacts", which creates a calendar populated from the birthdays stored in a user's contacts. The feature is a per-user preference: a user turns it on for their own account, and the server then maintains a birthday calendar for that user.

The report concerns the endpoint that toggles this preference. The researcher found that the request which enables the birthday calendar does not verify that the calendar being modified belongs to the caller, so a low-privileged user can enable the feature for any other account, including Admins and SuperAdmins. The weakness is classified as an Insecure Direct Object Reference (IDOR), with a medium severity and a CVSS score of 4.3. The affected asset is nextcloud/calendar, and the report was disclosed on 21 November 2023. The program published a security advisory for the issue at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-8jwv-c8c8-9fr3.

Setup

The report does not describe a specific deployment, version or tooling. What it does establish is the precondition that matters: the attacker only needs a low-privileged account on the Nextcloud instance. No administrative access, special role or additional configuration is required. The victim can be any user on the same instance, up to and including Admins and SuperAdmins.

To reproduce, the researcher used a browser with an intercepting proxy, since the third step of the reproduction is to intercept the request that the Calendar interface sends when the setting is toggled.

Finding it

The "Birthday Contacts" toggle in the Calendar settings is driven by a request whose target is identified by a user ID in the URL path. Because that identifier is supplied by the client, it is worth checking whether the server ties it to the authenticated session. In this case it does not: the request is accepted for any user ID, so the per-user preference can be flipped for someone else. The report states this works from a low-privileged account against any user, including Admins and SuperAdmins.

Exploitation

Step 1: Open the Calendar settings

Navigate to Calendar in the Nextcloud web interface. At the very bottom of the page are the calendar settings, where the "Enable Birthday Contacts" option is shown.

Step 2: Trigger the toggle with interception on

With the proxy intercepting traffic, click on Enable Birthday Contacts. The client sends the following request, which the researcher captured:

HTTP
POST /remote.php/dav/calendars/{userId}

<x3:enable-birthday-calendar xmlns:x3="http://nextcloud.com/ns"/>

The request goes to the WebDAV endpoint /remote.php/dav/calendars/{userId}. The {userId} path segment is the account whose calendar collection is being addressed. The body is a small XML document in the http://nextcloud.com/ns namespace, and its single element, x3:enable-birthday-calendar, is the instruction to turn the birthday calendar on. There is no other parameter carrying the target account: the only thing that selects the victim is the user ID in the path.

Step 3: Change the user ID and replay

The request targets the account named by {userId}, and the report states the feature can be enabled for any user, including Admins and SuperAdmins. The report states that this works for any user, including Admins and SuperAdmins, and that the attacker performing it holds only low privileges. The report does not include the server's response to the request.

Root cause

The endpoint accepts a user ID from the request path and acts on it without confirming that the caller is entitled to modify that user's calendar settings. The birthday calendar toggle is a per-user preference, so the server should derive the target from the authenticated session, or at minimum compare the path segment against it and reject mismatches. Here the client-supplied identifier is trusted, which is the classic IDOR pattern: the object reference is direct and the authorisation check on it is absent. The report does not describe the server-side code, so the exact location of the missing check is not stated; what the reproduction shows is that no such check is enforced on this request.

Impact

A user with low privileges can enable the "Birthday Contacts" feature for any other user on the instance, including Admins and SuperAdmins. The action is unauthorised: the victim did not choose to turn the feature on. The report frames the impact in exactly these terms and does not go further into what the resulting birthday calendar contains or how it is subsequently used, so the practical consequences beyond the unauthorised setting change are not established here. The program rated the issue medium with a CVSS score of 4.3.

Fix

The report itself does not describe the code change. What the behaviour calls for is an authorisation check on the endpoint: the target user in the path must be the authenticated user, or the server should ignore the path identifier and apply the change to the session's own account. The program published a security advisory at the link above.

Variants to test

  1. Other per-user WebDAV properties. Look for other small XML bodies sent to /remote.php/dav/calendars/{userId} or similar per-user DAV paths that toggle a preference. A positive result is the same request succeeding with another account's ID in the path.
  2. Other user-scoped settings endpoints. Any request where the account is selected by a path segment or body field rather than by the session is a candidate. A positive result is a state change visible on the victim's account after replaying the request with their identifier.
  3. Privilege direction. Repeat the test from the lowest-privileged account available against an administrative account. A positive result is a successful state change on the higher-privileged account, which is what made this report's impact clear.

Hunting notes

This kind of bug tends to hide in per-user preference toggles exposed over WebDAV, where the object being modified is named in the URL and the handler focuses on parsing the XML body rather than on checking ownership. During recon, watch for requests whose path contains a user identifier that the client controls, especially small, single-purpose XML bodies that flip a setting. The signal is that the identifier in the path is the only thing selecting the target, with no additional token or parameter binding it to the session.

On impact: the report states that a low-privileged user can enable the feature for Admins and SuperAdmins, which is what its impact section rests on.

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. 10 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. Think of it as a private version of Google Drive plus Google Calendar that a company runs itself. One of its most used parts is the Calendar app.

Inside the Calendar settings there is a switch called "Birthday Contacts". When a user turns it on, Nextcloud builds a calendar for that user filled with the birthdays saved in their contacts. It is a personal preference: each person decides for their own account whether they want it.

The researcher found that the request which flips this switch can be used to enable the feature for any user, including Admins and SuperAdmins. The account to be changed is named in the address (the URL) of the request. So a user with the lowest possible permissions can turn the birthday calendar on for somebody else, including an Admin or a SuperAdmin.

This kind of mistake has a name: an Insecure Direct Object Reference, or IDOR. The "object" is the thing being acted on (here, another user's calendar settings), the "reference" is the identifier used to point at it (here, the user ID in the URL), and it is "insecure" because the server never asks whether the caller is allowed to touch that object. A simple comparison: imagine a hotel where your room key is just the room number written on a card. If the front desk never checks the card against the guest list, anyone can write "301" on a card and walk into room 301. The number is a direct reference to the room, and nothing verifies it.

The issue was rated medium severity with a CVSS score of 4.3. CVSS is a standard scoring system for security bugs, where 0 is harmless and 10 is catastrophic; 4.3 sits in the middle-lower range. The affected component is nextcloud/calendar, and the report was made public on 21 November 2023. The program also published a security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-8jwv-c8c8-9fr3.

Context

Nextcloud is self-hosted, meaning an organisation runs it on its own infrastructure rather than using a service run by someone else. The Calendar app is one of the components users interact with most. Among its settings is "Birthday Contacts", which creates a calendar populated from the birthdays stored in a user's contacts. The feature is a per-user preference: a user turns it on for their own account, and the server then maintains a birthday calendar for that user.

The report concerns the endpoint that toggles this preference. An endpoint is simply a specific address on a server that accepts a particular kind of request, like a counter in a building that handles one type of paperwork. The researcher found that the request which enables the birthday calendar does not verify that the calendar being modified belongs to the caller, so a low-privileged user can enable the feature for any other account, including Admins and SuperAdmins.

Setup

The report does not describe a specific deployment, version or tooling. What it does establish is the precondition that matters: the attacker only needs a low-privileged account on the Nextcloud instance. No administrative access, special role or additional configuration is required. The victim can be any user on the same instance, up to and including Admins and SuperAdmins.

To reproduce, the researcher used a browser with an intercepting proxy. A proxy is a program that sits between your browser and the server and lets you read and edit every message that passes in either direction. It is useful here because the third step of the reproduction is to intercept the request that the Calendar interface sends when the setting is toggled, look at it, and change it before it reaches the server.

Finding it

The researcher noticed that the "Birthday Contacts" toggle in the Calendar settings is driven by a request whose target is identified by a user ID in the URL path. The URL path is the part of the address after the domain name, the equivalent of the folder and file names in a web address. Because that identifier is supplied by the client (the browser, which the attacker controls), it is worth checking whether the server ties it to the authenticated session. A session is the server's memory of who you are after you log in; it is usually carried by a cookie, a small piece of data the browser stores and sends back with every request so the server can recognise you.

In this case the request can be used to enable the feature for any user, so the per-user preference can be flipped for someone else. The report states this works from a low-privileged account against any user, including Admins and SuperAdmins. Authorisation is the server's decision about whether an identified user is allowed to do a particular thing, as opposed to authentication, which is only about proving who the user is.

Exploitation

Step 1: Open the Calendar settings

Navigate to Calendar in the Nextcloud web interface. At the very bottom of the page are the calendar settings, where the "Enable Birthday Contacts" option is shown. This step is just to reach the switch in the normal way, so the browser produces the same request a real user would send.

Step 2: Trigger the toggle with interception on

With the proxy intercepting traffic, click on Enable Birthday Contacts. The client sends the following request, which the researcher captured:

HTTP
POST /remote.php/dav/calendars/{userId}

<x3:enable-birthday-calendar xmlns:x3="http://nextcloud.com/ns"/>

Line by line:

  • POST /remote.php/dav/calendars/{userId} is the request line. POST is the method, the verb that tells the server this request wants to change something rather than just read it. /remote.php/dav/calendars/{userId} is the path being addressed. remote.php is a Nextcloud entry script, dav refers to WebDAV, a standard way for programs to read and write files and calendar data over HTTP, and calendars/{userId} points at the calendar collection of the account named by {userId}. The {userId} part is a placeholder: in a real request it is replaced by an actual account name.
  • The blank line separates the request line from the body.
  • <x3:enable-birthday-calendar xmlns:x3="http://nextcloud.com/ns"/> is the body, a small XML document. XML is a text format for structured data, using tags in angle brackets much like HTML. x3 is a prefix that stands for the namespace declared in xmlns:x3="http://nextcloud.com/ns", a way of saying which vocabulary the tag belongs to so names do not clash. The single element enable-birthday-calendar is the instruction to turn the birthday calendar on.

There is no other parameter carrying the target account: the only thing that selects the victim is the user ID in the path. That is the key observation. If the server wanted to protect this action, the path is the one place it would have to check.

Step 3: Change the user ID and replay

The request targets the account named by {userId}, and the report states the feature can be enabled for any user, including Admins and SuperAdmins. Replaying means sending the captured request again, possibly modified, from the proxy. The report states that this works for any user, including Admins and SuperAdmins, and that the attacker performing it holds only low privileges. The report does not include the server's response to the request.

Root cause

The endpoint accepts a user ID from the request path and acts on it without confirming that the caller is entitled to modify that user's calendar settings. The birthday calendar toggle is a per-user preference, so the server should derive the target from the authenticated session, or at minimum compare the path segment against it and reject mismatches. Here the client-supplied identifier is trusted, which is the classic IDOR pattern: the object reference is direct and the authorisation check on it is absent. The report does not describe the server-side code, so the exact location of the missing check is not stated; what the reproduction shows is that no such check is enforced on this request.

Impact

A user with low privileges can enable the "Birthday Contacts" feature for any other user on the instance, including Admins and SuperAdmins. The action is unauthorised: the victim did not choose to turn the feature on. The report frames the impact in exactly these terms and does not go further into what the resulting birthday calendar contains or how it is subsequently used, so the practical consequences beyond the unauthorised setting change are not established here. The program rated the issue medium with a CVSS score of 4.3.

Fix

The report itself does not describe the code change. What the behaviour calls for is an authorisation check on the endpoint: the target user in the path must be the authenticated user, or the server should ignore the path identifier and apply the change to the session's own account. The program published a security advisory at the link above.

Variants to test

  1. Other per-user WebDAV properties. Look for other small XML bodies sent to /remote.php/dav/calendars/{userId} or similar per-user DAV paths that toggle a preference. A positive result is the same request succeeding with another account's ID in the path.
  2. Other user-scoped settings endpoints. Any request where the account is selected by a path segment or body field rather than by the session is a candidate. A positive result is a state change visible on the victim's account after replaying the request with their identifier.
  3. Privilege direction. Repeat the test from the lowest-privileged account available against an administrative account. A positive result is a successful state change on the higher-privileged account, which is what made this report's impact clear.

Hunting notes

This kind of bug tends to hide in per-user preference toggles exposed over WebDAV, where the object being modified is named in the URL and the handler focuses on parsing the XML body rather than on checking ownership. During recon, watch for requests whose path contains a user identifier that the client controls, especially small, single-purpose XML bodies that flip a setting. The signal is that the identifier in the path is the only thing selecting the target, with no additional token or parameter binding it to the session.

On impact: the report states that a low-privileged user can enable the feature for Admins and SuperAdmins, which is what its impact section rests on.

Glossary

  • API: a defined set of addresses and rules that one program uses to talk to another, like a service counter with specific forms to fill in.
  • Authentication: proving who you are, for example by logging in with a password.
  • Authorisation: the server's decision about whether a known user is allowed to perform a specific action.
  • Birthday Contacts: a Nextcloud Calendar feature that builds a calendar from the birthdays stored in a user's contacts.
  • Cookie: a small piece of data a browser stores for a site and sends back with each request, often used to carry a session.
  • CVSS: a standard scoring system for security issues, from 0 (harmless) to 10 (catastrophic).
  • Endpoint: a specific address on a server that accepts a particular kind of request.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • IDOR (Insecure Direct Object Reference): a bug where the server takes an identifier supplied by the client to point at an object and does not check that the client is allowed to access that object.
  • Intercepting proxy: a tool that sits between browser and server, letting you read and modify the traffic in both directions.
  • Namespace (XML): a way of labelling tags so that names from different vocabularies do not clash, declared with xmlns.
  • Nextcloud: self-hosted collaboration software for files, calendars and contacts.
  • Parameter: a value sent with a request, either in the URL or in the body, that the server uses to decide what to do.
  • Path: the part of a URL after the domain name, identifying the resource being addressed.
  • Per-user preference: a setting that applies to one individual account rather than to the whole system.
  • POST: an HTTP method used when a request is meant to change something on the server.
  • Replay: sending a captured request again, possibly with modifications.
  • Request body: the part of an HTTP request after the headers that carries data, here a small XML document.
  • Session: the server's record of who you are after logging in, usually tied to a cookie.
  • Severity: a rating of how serious a security issue is, here medium.
  • SuperAdmin: the highest-privileged account role in Nextcloud.
  • URL: the full address of something on the web.
  • User ID: the identifier of an account, used in this report to select whose calendar is being changed.
  • WebDAV: an extension of HTTP for reading and writing files and calendar data over the web.
  • XML: a text format for structured data using tags in angle brackets.

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.