Skip to content
XSS Disclosed report Beginner

Cross site scripting - XSRF Token

A form on the Nextcloud enterprise purchase page did not sanitise user input, so an attacker could submit an image or SVG tag with an onload handler that executed in the confirmation email. The report claims the email exposed an XSRF token, which the attacker could then use in a later CSRF attack.

a9hora Follow

Originally disclosed on HackerOne

  • Triaged in 21 days
  • Fixed in 21 days
  • Disclosed after 51 days

Please follow below mentioned steps for reproducing the vulnerability.

  1. Open URL: https://nextcloud.com/enterprise/buy/

  2. Fill up valid name and email address and put payload in other fields.

    Payload/s:

     	{{media:0}}
    
     	<svg/onload=alert(document.cookie);>	
    
  3. Submit it

  4. Open email address you mentioned in the email field.

  5. Open up the email source.

  6. You will be prompted with xsrf-token.

Impact

As an attacker is getting the xsrf-token, he can utilize it in later attack such as, CSRF.

Attachments

XSS-XSRF_Token_PoC.mp4 From the original on HackerOne

The original report as published on HackerOne, by a9hora. 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 form input was stored and inserted into the confirmation email without HTML encoding or sanitisation.

Impact

The attacker could obtain an XSRF token from the email and potentially use it in a later CSRF attack, though the report does not demonstrate a full exploit.

What the attacker needed

Access to the public purchase form; a valid email address to receive the confirmation

How it was found

  1. Open the enterprise purchase page.
  2. Fill in a valid name and email address and put the payload in the other fields.
  3. Submit the form.
  4. Open the email address used in the form.
  5. View the email source.
  6. Observe the XSRF token in the email.

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.

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.