[Thirdparty] Stored XSS in chat module - nextcloud server 9.0.51 installed in ubuntu 14.0.4 LTS
A stored cross-site scripting vulnerability existed in the chat module of Nextcloud Server, where a user's full name containing a script payload was not properly sanitised. An attacker could execute arbitrary JavaScript in the context of a victim's session when the victim viewed the attacker's information in the chat module.
- Triaged in 43 hours
- Fixed in 3 months
- Disclosed after 4 months
I found stored XSS vulnerability in nextcloud server's chat module
Nextcloud Server version - 9.0.51 OS - Ubuntu 14.0.4 Browser - Internet Explorer 11
Steps:
- Login as non-admin user(attacker) and change full name containing XSS payload - elamaran'>"><script>alert(document.domain)</script>
- Login as admin/non-admin(victim) and go to chat module
- Click "Show information" of the attacker
- Then the stored XSS payload in attacker's name will get execute in nextcloud domain
POC Video URL - https://youtu.be/UU60IthJWxI
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application did not properly encode or sanitise user-supplied display names before rendering them in the chat module's information view.
What the attacker needed
A non-admin account; victim views attacker's info in chat
How it was found
- Log in as a non-admin user and set the full name to a value containing a script payload.
- Log in as an admin or another non-admin user and open the chat module.
- Click 'Show information' for the attacker's account.
- The stored script executes in the Nextcloud domain.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A user could set their display name to include a script, and when another user viewed that name in the chat, the script ran in their browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.