Description
The sanitize-svg package uses a deny-list-pattern to sanitize SVGs to prevent cross-site scripting (XSS). In doing so, literal <script>-tags and on-event handlers were detected:
There are more ways to embed JavaScript in XML files.
Recommendation
Update the @mattkrick/sanitize-svg package to the latest compatible version. Followings are version details:
- Affected version(s): <= 0.3.1
- Patched version(s): 0.4.0
References
Related Issues
- ckeditor-wordcount-plugin vulnerable to Cross-site Scripting in Source Mode of Editor - CVE-2023-37905
- external-svg-loader Cross-site Scripting vulnerability - CVE-2023-40013
- TinyMCE vulnerable to mutation Cross-site Scripting via special characters in unescaped text nodes - CVE-2023-48219
- editor.md vulnerable to Cross-site Scripting - CVE-2023-29641
You might also like:
- Tags:
- npm
- @mattkrick/sanitize-svg
Anything's wrong? Let us know Last updated on January 29, 2023


