InBrott
target://xss-profile-card
easyOPEN

Echoing Bio Card

xsshtml-encodingurl-validation

// Scenario

A community directory renders user profile cards as HTML snippets via render_profile_card(name, bio, website_url) / renderProfileCard(name, bio, websiteUrl).

// The Vulnerability

All three user inputs are injected directly into raw HTML:

  1. name and bio are not HTML-escaped, allowing <script> or <img onerror=...> payloads.
  2. website_url is placed straight into <a href="...">, allowing javascript: or data: URIs or attribute breakout via ".

// Your Task

  1. Escape HTML special characters (&, <, >, ", ') in all interpolated text and attribute values.
  2. Validate website_url: only allow http:// or https:// URLs (case-insensitive after trimming). Any unsafe or malformed URL should fall back to #.

Sample Sanity Checks (1)

  • Normal profile renders cleanly
    Valid name, bio, and https URL appear in card HTML
Hints (0/3)
initializing editor...

[idle] Press RUN to execute visible sample checks, or SUBMIT to run hidden exploit & functionality suites.