Skip to content
XSS Write-up Beginner

Investigating a Cross-Site Scripting (XSS) Attempt in Let’sDefe

A GET request to a search endpoint contained JavaScript in the query string, which triggered an XSS alert. The server responded with a 302 redirect and an empty body, so the script did not execute and the attack failed.

Akashwaris Follow

Published on systemweakness.com

While working on the Let’sDefend SOC lab, I came across a medium-severity alert that immediately caught my attention. The system flagged a GET request containing suspicious JavaScript code in the URL, indicating a potential Cross-Site Scripting (XSS) attack.

Akashwaris, on systemweakness.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 query parameter without executing it, and the redirect with an empty response prevented any script from running.

Impact

The attack did not succeed because the server redirected and returned no content, so no script executed and no compromise occurred.

What the attacker needed

Attacker sends crafted request; victim visits malicious URL

How it was found

  1. Review the alert details including the request URL and HTTP method.
  2. Check the source IP reputation on threat intelligence platforms.
  3. Examine the HTTP response status and size in log management.
  4. Verify whether the activity was a planned penetration test.
  5. Determine if the attack succeeded based on response and execution.
  6. Decide on containment and escalation based on the outcome.

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 an attacker tries to make a website run their JavaScript code, often by putting code into a URL or form field. Here the request included a script in the search query, but the server just redirected the browser and sent no page back, so the code never ran.

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.