Skip to content
XSS Disclosed report Intermediate CVE-2022-39331

XSS in Desktop Client in the notifications

The Nextcloud Desktop Client did not neutralise file names before displaying them in its notification and main dialog windows. An attacker who could name a file on a shared server could inject HTML that the desktop client rendered.

b911bade858ce8e6a0f50f8 Follow

Originally disclosed on HackerOne

Bounty$750 Low 3.5 View original
  • Triaged in 3 days
  • Fixed in 41 days
  • Paid in 3 months
  • Disclosed after 3 months

Summary by the program

Security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-c3xh-q694-6rc5

The report

Summary:

The Nextcloud Desktop Client application does not properly neutralize the names of files before using them.

Steps To Reproduce:

Server Machine

  1. Install the Nextcloud Server application
  2. Log into your account

Client Machine

  1. Install the Nextcloud Desktop Client application onto a machine that is running the Windows 10 operating system
  2. Log into your account

Server Machine

  1. Upload any file to your Nextcloud Server instance
  2. Rename the file that you uploaded to <h1><b><i><u>MikeIsAStar

Client Machine

  1. Wait until a notification appears exclaiming that some files could not synchronized
  2. Open the main dialog window of the Nextcloud Desktop Client application
  3. Observe that the name of the file that you uploaded is treated as HyperText Markup Language

Supporting Material/References:

Nextcloud_Desktop_Client_Cross-Site_Scripting__1.png
Nextcloud_Desktop_Client_Cross-Site_Scripting__1.png From the original on HackerOne

Impact

An attacker can inject arbitrary HyperText Markup Language into the Nextcloud Desktop Client application.

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

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 desktop client rendered file names as HTML in its notification and dialog UI without escaping them.

Impact

An attacker could inject arbitrary HTML into the desktop client.

What the attacker needed

Nextcloud Server account; Nextcloud Desktop Client on Windows 10; ability to upload and rename a file

How it was found

  1. Install and log into the Nextcloud Server.
  2. Install the Nextcloud Desktop Client on Windows 10 and log in.
  3. Upload a file to the server and rename it to a name containing HTML markup.
  4. Wait for the synchronisation failure notification.
  5. Open the client's main dialog and observe the file name rendered as HTML.

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.

When a program shows text it received from somewhere else, it must treat that text as plain text, not as instructions. Here the desktop app showed a file name as if it were a web page, so a crafted name could carry hidden markup. An attacker who can put a file on the server could then make the victim's desktop app display attacker-controlled content.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by b911bade858ce8e6a0f50f8

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.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.