Easy 4
Easy 4
Platform: web-kids20 | Category: Web | Type: Challenge | Difficulty: Easy | OS: NA | Author: XESXOR | Date: 2026-03-09 | Status: Solved Techniques: case_sensitive_filter_evasion, javascript_uri_case_bypass
Summary
XSS challenge where input is placed into an <a href=""> attribute. The escape function filters dangerous patterns but uses case-sensitive regex.
Easy 4 — Web Kids 2.0 (sibearsxss)
Description
XSS challenge where input is placed into an <a href=""> attribute. The escape function filters dangerous patterns but uses case-sensitive regex.
Analysis
Escape function:
javascript read-only • copy allowedfunction escape(s) { if (/script|data|\/|"/.test(s)) { s = '/'; } return '<a href="' + s + '">Click ME </a>'; }
Filters (case-sensitive):
script- blocks<script>andjavascript:data- blocksdata:URI/- blocks path traversal and closing tags"- blocks breaking out of href attribute
Key weakness: The regex /script|data|\/|"/ is case-sensitive (no /i flag). It only matches lowercase "script" and "data".
Solution
Use uppercase JAVASCRIPT: protocol which bypasses the case-sensitive filter:
Payload:
JAVASCRIPT:prompt('sibears')
The regex doesn't match "JAVASCRIPT" (uppercase), so the payload passes through.
Result:
html read-only • copy allowed<a href="JAVASCRIPT:prompt('sibears')">Click ME</a>
When the bot clicks the link, the javascript: URI executes (browsers treat it case-insensitively), triggering the prompt.