Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore tag "style", if sanitize can't parse CSS inside it #506

Closed
shevnv opened this issue Sep 11, 2024 · 1 comment
Closed

Ignore tag "style", if sanitize can't parse CSS inside it #506

shevnv opened this issue Sep 11, 2024 · 1 comment
Assignees

Comments

@shevnv
Copy link
Contributor

shevnv commented Sep 11, 2024

Now, if sanitize can't parse CSS, it leave this tag as is.
Our security engineer found a problem with svg+style+foreignObject, like this

<svg>
  <style>
    <foreignObject>
       ...some html with xss
    </foreignObject>
  </style>
</svg>

My suggestions, add in catch here removing tag "style", if sanitize can't parse CSS inside it.

@3y3
Copy link
Member

3y3 commented Sep 20, 2024

Fixed in latest versions

@3y3 3y3 closed this as completed Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants