html-minifier-next is vulnerable to Cross-Site Scripting (XSS)
61
Medium Risk
The minifier automatically processes the contents of JSON script elements such as application/json and application/ld+json by round-tripping them through JSON.parse() and JSON.stringify(). Because JSON.stringify() writes < and / literally, any \u003C escaping present in the source JSON is dropped from the output. A nested </script> sequence carried inside user-supplied JSON data can then terminate the containing script element early and inject live DOM, including a second executing script. The fix re-escapes < as \u003C after stringifying so encoded payloads can no longer break out of the script element.
You are affected if you are using a version that falls within the vulnerable range and you minify HTML that contains JSON script elements (such as application/json or application/ld+json) carrying untrusted, user-supplied content.
html-minifier-next is vulnerable to Cross-Site Scripting (XSS) in versions 4.6.0 - 7.5.1.
Upgrade the html-minifier-next library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant