Nextcloud 35.0.0 — a calendar edit-sharee can publish the owner's calendar to an unauthenticated URL
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · nextcloud-calendar-sharee-publish
Nextcloud Server 35.0.0 - Nextcloud GmbH
CalDAV PublishPlugin only checks {DAV:}write. Owner-limit limitAddressBookAndCalendarSharingToOwner defaults to no. A colleague you gave edit on a calendar can publish it. Anyone with the secret URL reads your non-PRIVATE events with no login.
A bad actor with edit on your calendar can turn it into a public URL. Anyone who has that URL can read your meetings and attendees without logging in.
| ID | no CVE yet |
| CWE | CWE-284, CWE-862 |
| CVSS | High: 6.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| Product | Nextcloud Server |
| Affected | 35.0.0 (da02f41) official nextcloud:35.0.0-apache |
| Auth | write-sharee, then unauthenticated public read |
| License | GNU Affero GPL v3.0 |
| Lab | 127.0.0.1 only |
You share a calendar with a colleague as can edit. That colleague posts publish-calendar. Nextcloud mints a public calendar URL.
Then:
PRIVATE objects)Reshare of the calendar is forbidden. Publish is not. The owner-limit config exists and is off by default.
PublishPlugin checks {DAV:}write, then dav / limitAddressBookAndCalendarSharingToOwner, which defaults to no. Calendar::updateShares forbids reshare when isShared(). Publish is a different verb. Write ACL still grants {DAV:}write to an edit-sharee.
I stood up official nextcloud:35.0.0-apache. Owner calendar labcal with a non-PRIVATE event SUMMARY NEXTCLOUD-CAL-SHAREE-PUBLISH-WITNESS.
First I sent MKCALENDAR. Sabre came back 405 MethodNotAllowed. I PUT the VEVENT anyway. 201. The calendar was there. The collection-create verb was the wrong door, not the wrong house.
Shared read-write to sharee. Sharee POST CS:publish-calendar returned 202. Unauth PROPFIND on the public URL contained the witness.
cd lab
./run.sh
Target only http://127.0.0.1:18344.
SUCCESS NEXTCLOUD-CAL-SHAREE-PUBLISH who=write-sharee unauth-read=yes NEXTCLOUD-CAL-SHAREE-PUBLISH-WITNESS
Require the owner principal for publish, or default the owner-limit on and still deny publish for isShared() calendars. Reshare is already forbidden. Publish should follow it.
GNU Affero GPL v3.0. See LICENSE. Loopback lab only. No warranty.