Page cover
githubEdit

syringeHTML Injection

Tests if the website renders HTML tags
<b>tokyo</b>
circle-info

Common characters that may be filtered

  • Parentheses () - Required for JavaScript function calls

  • Semicolons ; - Used to terminate JavaScript statements

  • Quotes ' - May be filtered while " is not

  • Angle brackets <> - HTML tag delimiters

chevron-rightThe OnError Bypass Methodhashtag

The onerror event handler is one of the most reliable HTML injection techniques because it triggers automatically when an HTML element fails to load a resource.

This makes it ideal for bypassing input filters that don't sanitize quotes

circle-info

Breakdown

  1. x" - Closes the current HTML attribute value

  2. onerror="" - Injects the JavaScript event handler

  3. x=" - Opens a new attribute to maintain valid HTML syntax

circle-info

File Upload Context

Trigger the Error

circle-info

Context-Aware Payload Construction

chevron-rightBypass Using HTML Hex Encodinghashtag
circle-info

Python encoding script

circle-info

Cyber-Chef Recipe example

Last updated