Intel

AIKIDO-2026-533631

@clerk/astro is vulnerable to Cross-site Scripting (XSS)

Cross-site Scripting (XSS) Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 4 days ago

71

High Risk

This Affects:

JS@clerk/astro
0.0.1 - 3.4.18
Fixed in 3.4.19
Are you affected? Scan for Free

TL;DR

Affected versions of this package are vulnerable to stored Cross-site Scripting (XSS). Clerk auth state is serialized with JSON.stringify into SSR <script> tags. User-controllable session claims containing a </script> sequence can break out of the script element and execute arbitrary JavaScript in the browser. The fix escapes <, >, and / (and Unicode line terminators) so the embedded JSON remains safe while parsing to identical values on the client.

Who does this affect?

You are affected if you use @clerk/astro within the vulnerable range and render SSR pages that embed Clerk auth state, especially when session claims can contain user-controlled values.

Background info

@clerk/astro is vulnerable to Cross-site Scripting (XSS) in versions 0.0.1 - 3.4.18.

How to fix this

Upgrade the @clerk/astro library to the patch version.