CVE-2026-129158 in ragent
Summary
by MITRE • 11/13/2026
ragent 1.1.0 contains a stored cross-site scripting vulnerability that allows authenticated users to inject scripts by uploading SVG knowledge-base documents served inline as image/svg+xml. Attackers can upload a script-bearing SVG via /knowledge-base/{kb-id}/docs/upload so that victims opening /knowledge-base/docs/{docId}/file execute it in the application origin, enabling account takeover.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/13/2026
The vulnerability identified in ragent version 1.1.0 represents a critical security flaw classified as a Stored Cross-Site Scripting (XSS) issue. This type of vulnerability is particularly dangerous because the malicious payload is persistently stored on the target server, ensuring that every user who accesses the affected content is exposed to the attack without requiring any specific interaction from the attacker beyond the initial upload. The root cause lies in insufficient input validation and sanitization mechanisms when handling uploaded files within the knowledge-base module. Specifically, the application fails to adequately inspect or sanitize SVG (Scalable Vector Graphics) documents before processing them for display. By allowing users with authenticated access to upload these files through the endpoint /knowledge-base/{kb-id}/docs/upload, the system inadvertently creates a vector for code injection that persists in the backend storage.
The technical mechanism of this exploit relies on the MIME type handling and content rendering behavior of the web application. When an attacker uploads an SVG file containing embedded JavaScript or other executable script elements, the server stores this malicious document without stripping out the dangerous tags. Subsequently, when a victim user navigates to view the uploaded document via the endpoint /knowledge-base/docs/{docId}/file, the server serves the content with the MIME type image/svg+xml. Modern web browsers interpret SVG files as XML documents and allow scripting within them if certain conditions are met, such as the presence of specific event handlers or script tags that execute upon rendering. Because the browser treats the response as a trusted resource from the application's origin, any scripts embedded in the SVG are executed with the same privileges as legitimate application code.
The operational impact of this vulnerability is severe and directly leads to account takeover scenarios. Since the XSS payload executes within the context of the authenticated user’s session, an attacker can steal sensitive information such as session cookies, authentication tokens, or personally identifiable data stored in local storage. Furthermore, the attacker can perform actions on behalf of the victim, including modifying settings, accessing restricted knowledge base documents, or even escalating privileges if administrative functions are accessible via client-side scripts. This undermines the integrity and confidentiality guarantees provided by the application’s authentication model. The persistence of the payload means that a single successful upload can compromise multiple users over time, amplifying the blast radius significantly compared to reflected XSS attacks which require targeted social engineering for each victim.
From an industry standards perspective, this vulnerability aligns with CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as Cross-site Scripting. More specifically, it falls under CWE-836: Use of Password Hash With Insufficient Computational Effort if the stolen credentials are used for further attacks, but primarily it is a classic case of stored XSS where input validation fails at multiple layers. In terms of offensive security frameworks, this attack maps to MITRE ATT&CK technique T1059.007: JavaScript, which describes how attackers use scripting languages to execute malicious code within the browser environment. It also relates to TA0003: Persistence and TA0005: Defense Evasion as the payload remains on the server for future exploitation without leaving immediate traces of an active attack session during execution.
To mitigate this vulnerability, developers must implement strict allow-list based validation for all uploaded file types rather than relying solely on MIME type detection or extension checking. SVG files should either be disallowed entirely if not strictly necessary for business logic, or processed through a robust sanitization library that strips out all executable content such as script tags, event handlers (like onload), and foreign objects before storage. Additionally, implementing Content Security Policy headers can help mitigate the impact by restricting where scripts can load from and preventing inline script execution, although this is considered a defense-in-depth measure rather than a primary fix. Input validation should occur both on the client side for user experience and critically on the server side to prevent malicious data entry. Regular security audits and static code analysis focused on file upload handlers are recommended to detect similar weaknesses in other parts of the application architecture before they can be exploited by adversaries seeking unauthorized access or data exfiltration capabilities.