-
-
Notifications
You must be signed in to change notification settings - Fork 396
Closed
Description
This code:
<<img src="javascript:evil"/>img src="javascript:evil"/>
Results in the following sequence of onopentag/ontext/onclosetag events:
text: < open: img (with the expected src attribute) close: img text: img src="javascript:evil"/>
Since the sanitize-html module trusts "text" coming from htmlparser2, and outputs it without further escaping (because htmlparser2 does not decode entities in text before delivering it), this results in an XSS attack vector if sanitize-html ignores the img tag (according to user-configured filter rules) but passes the text intact, as it must do to keep any text in documents.
I have verified that the bug still exists as of version 3.7.3.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels