@clerk/shared is vulnerable to Cross-site Scripting (XSS)
71
High Risk
Affected versions of @clerk/shared are vulnerable to stored Cross-site Scripting (XSS) when Clerk auth state is serialized into SSR <script> tags. JSON.stringify leaves <, >, and / unescaped, so a </script> sequence inside user-controllable session claims can break out of the script element and execute arbitrary JavaScript. The fix introduces htmlSafeJson, which escapes those characters (and U+2028/U+2029) to Unicode escapes so the embedded JSON still parses to identical values on the client.
You are affected if you are using a version that falls within the vulnerable range.
@clerk/shared is vulnerable to Cross-site Scripting (XSS) in versions 0.0.1 - 4.25.4.
Upgrade the @clerk/shared 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