Skip to content
XSS Write-up Beginner

When a Checkbox Breaks Your Security: It Turned Into an XSS.

A URL parameter reflecting a checkbox value was inserted into the page without encoding, allowing HTML and then JavaScript to execute. An attacker could craft a link that runs script in a victim's authenticated session, though a WAF blocked some payloads and the endpoint was out of scope.

vidhanthakur173 Follow

Published on medium.com

This write-up is a breakdown of how a small curiosity triggered a full-blown reflected XSS discovery in a live production environment. If you’re into practical bug hunting, this will show you exactly how a tiny UI detail can expose a security flaw and I hope you like it.

Vidhan Thakur, 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

Likely the application reflected the Facility parameter into the HTML response without output encoding or validation.

Impact

An attacker could run script in a victim's authenticated session via a crafted link, though Cloudflare blocked some event-based payloads and the endpoint was outside the program's scope.

What the attacker needed

Victim clicks a crafted link; victim is logged in; endpoint is in scope (it was not)

How it was found

  1. Select a checkbox and observe that a Facility parameter is appended to the URL.
  2. Send a single quote in the Facility value and see it rendered as text without encoding.
  3. Send an HTML tag in the Facility value and see it rendered as markup.
  4. Send a script tag in the Facility value and see the JavaScript alert execute.

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.

When a website takes a value from the address bar and puts it directly into the page without cleaning it, an attacker can put code in the link. If a logged-in user clicks that link, the code runs as if the site itself had written it. This is called reflected cross-site scripting, or XSS.

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.