Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-accessible pre-auth endpoint, no privileges needed, victim interaction required; scope changes to browser context enabling credential/session theft.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
4DescriptionCVE.org
A weakness has been identified in kortix-ai suna up to 0.8.38. Affected by this issue is the function router.replace/router.push of the file apps/frontend/src/app/auth/page.tsx of the component Auth Endpoint. Executing a manipulation of the argument returnURL can lead to cross site scripting. The attack may be launched remotely. The exploit has been made available to the public and could be used for attacks. Upgrading to version 0.8.39 can resolve this issue. This patch is called f5dec7aa0c1b8fa0125938f292c0f2430ca75f6c. It is advisable to upgrade the affected component. The researcher explains: "The issue was fixed in v0.8.39 without notifying the wider user base via a security disclosure."
AnalysisAI
Reflected cross-site scripting in Suna's authentication endpoint allows remote attackers to execute arbitrary JavaScript in a victim's browser by manipulating the returnURL parameter passed to Next.js router.replace/router.push. All Suna releases from 0.8.0 through 0.8.38 are affected; the flaw spans every auth action (signIn, signUp, resetPassword, signInWithPassword, signUpWithPassword, sendOtpCode, resendMagicLink, installOwner) because none sanitized the returnUrl form field before use. A public proof-of-concept exploit exists (GitHub Gist by TrebledJ); no public exploitation confirmed and the vulnerability is not listed in CISA KEV.
Technical ContextAI
Suna is a Next.js-based AI agent web platform (CPE cpe:2.3:a:kortix-ai:suna:*:*:*:*:*:*:*:*). The authentication server actions in apps/web/src/app/auth/actions.ts read the returnUrl value directly from FormData without sanitization, then pass it to router.replace or router.push - Next.js client-side navigation functions that accept arbitrary URL strings including JavaScript: protocol URIs. This pattern is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation / Cross-Site Scripting). The root cause is the absence of any allowlist or sanitization layer on the returnUrl parameter across all eight auth action handlers. The fix (commit f5dec7aa) introduces a sanitizeAuthReturnUrl() helper from @/lib/auth/return-url that is applied to every auth action's returnUrl extraction point before the value is used.
RemediationAI
Upgrade Suna to version 0.8.39 or later; this is a vendor-released patch confirmed by both the tagged release at https://github.com/kortix-ai/suna/releases/tag/v0.8.39 and commit f5dec7aa0c1b8fa0125938f292c0f2430ca75f6c. If immediate upgrade is not possible, apply a compensating control by enforcing a server-side allowlist on the returnUrl parameter, rejecting any values that do not match expected internal path patterns (e.g., must begin with '/' and contain no protocol specifier or external host). Alternatively, configure a WAF rule to block requests to /auth endpoints where the returnUrl parameter contains 'javascript:', data URIs, or external hostnames - note this may break legitimate deep-link flows if the allowlist is too narrow and requires testing. The researcher notes the fix was deployed silently without a security disclosure, so operators should treat any Suna deployment prior to 0.8.39 as unpatched regardless of when it was last updated.
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-38197
GHSA-fpgm-v536-ccc8