-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
When using the DOMPurify library to sanitize HTML from malicious code here, the library doesn't sanitize CSS style tags. These can be used to change the website's appearance and possibly to pull off clickjacking attacks. - https://portswigger.net/web-security/clickjacking
I suggest adding using a DOMPurify config like this one:
const dompurifyConfig = {
FORBID_TAGS: ['style', 'form'],
}
const sanitized = DOMPurify.sanitize(displayValue, dompurifyConfig);
I also added HTML forms to the forbidden tags as they can be used for creating a fake login screen
oliviertassinari
Metadata
Metadata
Assignees
Labels
No labels