Kotaemon Cross-Site Scripting Vulnerability Allowing Arbitrary Code Execution via Crafted PDF

Vulnerability

A stored cross-site scripting vulnerability has been identified in Kotaemon version 0.11.0. This issue allows attackers to execute arbitrary JavaScript by uploading a malicious PDF, which is rendered without proper sanitization. The vulnerability is compounded by the application's practice of storing plaintext credentials in localStorage, leading to a complete session compromise.

Impact

Exploitation of this vulnerability allows for the execution of arbitrary JavaScript in the context of the user, enabling credential theft and session hijacking. Additionally, it causes a loss of trust in the application's document processing and AI output integrity.

Reproduction

To reproduce this vulnerability, upload a PDF containing a crafted image or table that exploits the unsanitized rendering process. Once the PDF is uploaded, the embedded JavaScript will execute, accessing and exfiltrating stored credentials from localStorage.

Remediation

Users are advised to monitor for updates from the Kotaemon development team and avoid uploading untrusted documents until a patch is available.

Added: Nov 18, 2025, 5:26 PM
Updated: Nov 18, 2025, 5:26 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
8.3
exploitability
6.3
remediation
0.0
relevance
1.1
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.