"/>

Onerror=prompt(8)> — "><img Src =q

The vulnerability arises when an image tag is crafted with an "onError" attribute that contains malicious JavaScript code. Specifically, when the image fails to load, the JavaScript code in the "onError" attribute is executed. This can be achieved by setting the "src" attribute of the image tag to a non-existent or invalid URL, triggering the "onError" event.

The following example illustrates the vulnerability: "><img src =q onError=prompt(8)>

The "onError" attribute in HTML is used to specify a JavaScript function to be executed when an image fails to load. However, this attribute can also be exploited to execute arbitrary JavaScript code, potentially leading to security vulnerabilities. The vulnerability arises when an image tag is

back to top of the page icon