CVE-2026-72594 in lobe-chat
Summary
by MITRE • 08/10/2026
A stored cross-site scripting (XSS) vulnerability in lobehub/lobe-chat through v2.2.13 allows a low-privileged authenticated user to inject arbitrary JavaScript into the application by uploading a crafted SVG file as a user avatar. The avatar upload handler derives the stored file extension and S3 content type from the original filename rather than inspecting file content, enabling an attacker to store an SVG containing a script element that executes in the browser of any user who views the attacker's profile or avatar.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 08/10/2026
This vulnerability represents a critical stored cross-site scripting flaw in the lobe-chat application ecosystem where user-uploaded content is improperly validated and processed. The security weakness stems from insufficient input sanitization during file upload operations, specifically when handling user avatars through the SVG file format. The vulnerability exists because the application's avatar upload handler performs file validation based solely on filename extensions and content type headers rather than examining the actual file content, creating a fundamental security gap that allows malicious actors to bypass intended restrictions.
The technical implementation of this flaw occurs at the application layer where the system accepts uploaded files without proper content inspection mechanisms. When a user uploads an avatar, the system extracts the file extension and S3 content type information directly from the original filename metadata rather than validating the actual file structure and content. This approach creates a dangerous trust relationship between the file name and its content, allowing an attacker to manipulate the filename extension while maintaining the actual SVG file format. The vulnerability specifically affects versions up to v2.2.13 of the lobe-chat application, indicating this was a known issue that persisted through multiple releases.
The operational impact of this vulnerability extends beyond simple data theft or defacement, as it enables persistent malicious code execution within user sessions. Any authenticated user with minimal privileges can exploit this weakness to inject JavaScript payloads into SVG files that will execute whenever other users view the attacker's profile page or avatar display. This creates a vector for session hijacking, credential theft, and potential lateral movement within the application environment. The stored nature of the vulnerability means that once exploited, the malicious code remains active until manually removed from the system, providing attackers with persistent access to victim sessions.
The attack vector leverages the trust placed in user-generated content within web applications and demonstrates a classic weakness in file upload validation processes. This vulnerability directly maps to CWE-79 (Cross-site Scripting) and aligns with ATT&CK technique T1566.001 (Phishing via Social Media) as attackers can use this method to create malicious profiles that appear legitimate while executing harmful code against unsuspecting users. The low privilege requirement for exploitation makes this particularly dangerous as it requires minimal access rights to compromise the application's integrity and user sessions.
Mitigation strategies should focus on implementing robust file validation mechanisms that inspect actual file content rather than relying solely on metadata. Organizations should implement proper file type detection using content-based verification, enforce strict MIME type checking with content inspection, and sanitize all uploaded files before storage. The recommended solution involves validating file signatures, examining file headers, and rejecting any uploads that do not conform to expected content structures. Additionally, implementing Content Security Policy (CSP) headers and proper input sanitization techniques will help prevent execution of malicious scripts even if the upload validation is bypassed. Regular security assessments and automated vulnerability scanning should be implemented to identify similar weaknesses in other application components and ensure comprehensive protection against file-based attack vectors.