Skip to content
XSS Write-up Beginner

Cross-Site Scripting (XSS) Vulnerability in a Plain-View

A stored cross-site scripting vulnerability was found in the HTML editor of LavaLite CMS version 10.1.0, where user-supplied HTML input was not sanitised. An attacker could inject JavaScript that executes for any user viewing the affected page, though the session cookie's HttpOnly flag prevented cookie theft.

medium.com

Published on medium.com

I am writing this blog as a junior cybersecurity consultant to document my journey of growth. I have explored hacking across various fields, including web applications, network applications, and mobile applications.

Pattharadanai Sanitjairak, 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

Impact

The stored XSS could execute JavaScript for any user viewing the affected page, potentially enabling session hijacking, account takeover, or phishing, but the HttpOnly flag on the session cookie prevented cookie theft in this instance.

What the attacker needed

Access to the HTML editor; victim views the affected page

How it was found

  1. Open the HTML editor in LavaLite CMS and enter normal text, using the bold function.
  2. Observe the request generated by the editor, which wraps the text in HTML tags.
  3. Append an XSS payload directly to the request.
  4. Submit the request and observe that the payload executes in the browser.

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.

Cross-site scripting (XSS) is when a website lets a user insert code (usually JavaScript) that then runs in other people's browsers. Here, the CMS's HTML editor accepted raw HTML and JavaScript without cleaning it, so anything typed there would run for anyone who viewed the page. The session cookie was protected by a flag called HttpOnly, which stops JavaScript from reading it, so the attacker could not steal the login cookie in this case.

What is XSS?

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

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.