/

CVE-2026-72594

Severity:

HIGH RISK

(7.6)

Stored Cross-Site Scripting (CWE-79) in Lobe Chat Avatars

CVE-2026-72594

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Arbitrary JavaScript Execution

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Lobe Chat through v2.2.13 contains a stored cross-site scripting vulnerability in its user avatar upload feature. A low-privileged authenticated user may upload a crafted SVG file containing JavaScript, which can execute when the avatar is rendered in a vulnerable application context.

Affected context

The vulnerability occurs in Lobe Chat deployments that allow authenticated users to upload SVG files as avatars and later render those files without sufficiently restricting active content. Risk depends on how uploaded media is stored, served, embedded, and sanitized, as well as which users can view the affected avatar.

Exploit preconditions

  • Attack surface: Authenticated avatar upload and rendering functionality
  • Required access: A low-privileged authenticated account with permission to set or update an avatar
  • Trigger point: A crafted SVG avatar is subsequently displayed in a browser context that permits script execution
  • Why exploitation is possible: The application may treat user-controlled SVG content as trusted media without adequately removing scripts or isolating the uploaded file

Why this happens

The underlying issue is insufficient neutralization of user-controlled SVG content before it is stored and rendered.

SVG is an active document format that can contain script-capable elements or event handlers. When an application accepts uploaded SVG files as avatars and serves them in a browser-executable context without strict sanitization or isolation, attacker-controlled content may execute in another user's session. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.

Potential impact

  • A malicious script may execute in the context of a victim's session
  • User-specific data may be exposed
  • Authenticated actions may be performed without the victim's intent
  • Session-related information or application tokens could be targeted
  • Malicious content may persist and affect multiple users who view the avatar

General mitigation guidance

Mitigation generally focuses on treating uploaded SVG files as untrusted active content.

Common defensive patterns include:

  • Prefer inert raster image formats for avatars where SVG is not required
  • Apply robust allowlist-based SVG sanitization before storage or delivery
  • Remove scripts, event handlers, external references, and unsafe elements from accepted SVG files
  • Serve user-uploaded files from an isolated origin with restrictive content policies
  • Use appropriate content types, download handling, and browser security headers
  • Enforce authorization and least privilege for upload, replacement, and media access operations
  • Avoid rendering untrusted uploads directly into privileged application pages

How teams detect issues like this

Organizations commonly detect this class of issue through:

  • Static analysis checks for unsanitized user uploads rendered in HTML or image contexts
  • Code review signals involving SVG parsing, direct file serving, innerHTML, or dynamic URL assignment
  • Tests that upload active content and verify that scripts and event handlers cannot execute
  • Content security policy monitoring for unexpected script execution or external resource loads
  • Policy enforcement that restricts avatar uploads to approved inert formats
  • Automated security testing and code review tools that identify stored XSS data flows

Sources

SourceLink
github.comgithub.com/lobehub/lobe-chat

Frequently asked

questions

It may be exploitable through the application's normal web interface when a low-privileged authenticated user can upload an SVG avatar and another user views it in a script-capable context.

The described condition requires an authenticated account with permission to upload or change a user avatar. The attacker generally does not need administrative privileges.

Prefer inert image formats, or apply strict allowlist-based SVG sanitization and serve uploaded content from an isolated, non-privileged origin.

Treat all uploaded media as untrusted, test active formats during security review, enforce restrictive content policies, and ensure stored files cannot execute script in the application's origin.

Find out what's already
exploitable in your codebase.