Skip to content
XSS Disclosed report Intermediate CVE-2020-8189

XSS in desktop client via invalid server address on login form

The Nextcloud Windows desktop client's login form displayed server error responses in an embedded browser-like alert box that could render HTML and execute local files. An attacker controlling a server address could craft a response that, when shown, allowed running a local executable such as the calculator without confirmation.

jplopezy Follow

Originally disclosed on HackerOne

Medium 4.7 View original
  • Triaged in 5 days
  • Fixed in 9 months
  • Paid in 10 months
  • Disclosed after 12 months

Team!

I have found this vulnerability that in my time would be called "cross zone" but at the moment I don't know.

The problem is found in the latest version of "nextcloud.exe" for your windows version.

The problem occurs with the initial screen where you ask to connect to a website.

Apparently when you put an invalid URI that generates some type of response code like 403, it is reported in a small window, as if it were an alert box, not in the main.

This "alert box" visualizes the response and to my impression (that's why I said the cross zone) has a little more permissions than the internet explorer.

For example, if the response code has an <S> test</S> it will interpret it as IE does.

That's fine, it would only be an html injection.

The problem, for example, is that it allows you to run a file like the calculator locally without any confirmation.

This vector works : <A HREF="file:///C:/WINDOWS/system32/calc.exe">CALC.EXE</A>

In my opinion, response code errors are a problem and must be controlled by the application.

For the demonstration use the burp.

But basically any personal site where the response code building could be controlled could exploit it.

I attach a video to make everything clearer.

Impact

The impact is that you can run local files without authorization (of the application) in a context where you should warn.

It should be filtered so as not to disturb that it is a vector.

Attachments

nextcloud.webm From the original on HackerOne

The original report as published on HackerOne, by jplopezy. 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 error dialog used an embedded browser control with local file access instead of displaying the server response as plain text.

Impact

An attacker who controls the server address could cause local executables to run without the application's authorisation, though the report does not show remote code execution beyond launching a local file.

What the attacker needed

Nextcloud desktop client on Windows; attacker controls the server address; victim enters the address and clicks a link

The fix

The application should treat server error responses as untrusted text and not render them as HTML in a browser control with local file access.

How it was found

  1. Open the Nextcloud desktop client login screen.
  2. Enter a server address that returns an error response containing HTML.
  3. Observe that the error pop-up renders the HTML.
  4. Include a link to a local executable in the response and click it to run the file.

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 you type a server address into the Nextcloud desktop app, the app shows any error message from that server in a small pop-up. That pop-up was not a plain text box: it could understand web page code and even open files on your own computer. So a malicious server could make the pop-up run a program on your machine.

What is XSS?

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

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.