Skip to content
XSS Write-up Beginner

When Support Portals Bite Back: DOM-XSS in a Helpcenter

A helpcentre page built its tunnel list by concatenating API-supplied host and IP values directly into HTML via jQuery.append, creating a DOM-XSS sink. An attacker who could control those API values could run JavaScript in the context of the support portal.

devanshpatel930 Follow

Published on medium.com

FREE LINK

Devansh Patel, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The code used jQuery.append with string concatenation of untrusted API values instead of setting text content, so HTML in those values was interpreted.

Impact

The bug was not exploitable at the time because the API values were static infrastructure hosts, but if customers could register custom hostnames, attacker-controlled JavaScript could run for every visitor, enabling cookie theft, phishing, or defacement.

What the attacker needed

Attacker controls API host or IP values; victim visits the tunnel list article

The fix

The code should build elements and set their text content instead of concatenating strings into HTML, and a strict CSP should be added.

How it was found

  1. Open the public knowledgebase article that lists tunnels.
  2. Open the browser developer console.
  3. Paste a snippet that appends an image element with an onerror handler into the tunnel list.
  4. Observe the alert showing the document 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 write-up has not been written yet. The Original tab links to the source.

The page took text from an API and glued it into the page's HTML without cleaning it. If that text contained HTML tags, the browser would treat them as real markup and run any script inside. The author proved this by pasting a small HTML snippet into the browser console and seeing an alert box appear.

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 devanshpatel930

View all

2 more disclosed reports, best first.

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.