Skip to content
XSS Disclosed report Beginner

HTML Injection on "polls" app - comments section (possibly XSS)

The Polls app did not filter user input in the survey Description field, so an attacker could inject arbitrary HTML into a poll page. This allowed phishing content to be shown to victims and a client-side denial of service by loading many iframes; the author could not achieve JavaScript execution.

supr4s Follow

Originally disclosed on HackerOne

  • Triaged in 15 hours
  • Fixed in 37 days
  • Disclosed after 38 days

Hi everyone,

On latest version of Polls app (1.7.5), I noticed a lack of user input filtering for the "Description" part of the survey. An HTML injection is therefore possible. I tried to inject JavaScript code to get an XSS but I didn't succeed. Certainly someone better than me will be able to do it.

Phishing

Knowing that you can inject HTML, you can do cool stuff like phishing with the following code :

<br/> <br/><br/><br/><br/><br/><marquee><p style="color:red;"><b>!!!!! IMPORTANT message from Nextcloud administrator !!!!!!</b></p></marquee><br/><br/> A security issue was found last night.<br/> <p style="color:green;">Please go to manually on <a><b>changing-password.cloud.evil.com</a></b> to reset your password.</p> <b><p style="color:red;">Thank you in advance for doing so as soon as possible. </p></b><br/><br/><i>The IT team.</i></b><br/><br/> <br/><br/><br/> <b><marquee><p style="color:red;">!!!!! IMPORTANT message from Nextcloud administrator !!!!!!</b></p></marquee><br/><br/><br/><br/> <br/><br/>

And the website changing-password.cloud.evil.com would first ask for entering the user's current password, before he enters his new password => password retrieved from the attacker's server

Proof-of-concept : https://███/apps/polls/s/cxXkCK9LRXIKu5Oq

DoS (client side)

You can also make the user's PC spit by loading an infinite number of iframes.

Proof-of-concept (Warning, may crash your PC) : https://███████/apps/polls/s/WKGKWHEFSSvPsHyC

Impact

  • Attract the user to redirect him to a malicious page and steal his personal identifiers
  • Client-side DoS
  • And many other things are possible by injecting HTML code at will and without filtering

In my opinion, I don't think it's a good thing to let the user add HTML code as he wants without being worried!

Regards, Supras

Attachments

HTMLi_1.png
HTMLi_1.png From the original on HackerOne

The original report as published on HackerOne, by supr4s. 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 survey Description field is rendered as raw HTML without sanitisation or output encoding.

Impact

An attacker could show fake administrator messages and links to steal credentials, and could crash a victim's browser with many iframes; JavaScript execution was not achieved.

What the attacker needed

Ability to create or edit a poll; victim opens the poll share link

The fix

The Description field should be sanitised or HTML-encoded to prevent HTML injection.

How it was found

  1. Open the Polls app and create or edit a survey.
  2. Put HTML markup into the Description field.
  3. Save the survey and open its public share link.
  4. Observe the injected HTML rendered on the page.

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 poll page lets people type a description, and the app puts that text straight into the web page without cleaning it. Because of this, someone can type HTML (the code that builds web pages) and the browser will treat it as real page content, such as fake warnings or links. The reporter could not run JavaScript, but could still trick users into visiting a fake password page.

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 supr4s

View all

13 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.