Skip to content

Client‑side DOM XSS in the web chat app of Dify when using echarts

High
41tair published GHSA-qqjx-5h5w-x5vj Feb 11, 2026

Package

No package listed

Affected versions

<= V1.11.4

Patched versions

None

Description

Summary

A cross site scripting vulnerability has been found in the web application chat frontend when using echarts. User or llm inputs containing echarts containing a specific javascript payload will be executed.

Details

The problematic code is in web/app/components/base/markdown-blocks/code-block.tsx:208 and web/app/components/base/markdown-blocks/code-block.tsx:253:

        try {
          // eslint-disable-next-line no-new-func, sonarjs/code-eval
          const result = new Function(`return ${trimmedContent}`)()

The code inside new Function () is executed as immediately-invoked function expression (IIFE).

PoC

  • Run a chat app
  • Input the payload
```echarts
  ({
    title: { text: 'Test XSS' },
    series: [],
    _x: (() => {
      alert('Hello');
      return 1;
    })()
  })
image
  • Javascript is executed
image

Impact

Full arbitrary JavaScript execution in the victim’s browser, in the context of the app. That means:

  • Account/session takeover via log
  • Data exfiltration from the UI (chat history, files, secrets visible in DOM).
  • Unauthorized actions via in‑app APIs using the victim’s session.
  • If the payload is saved (chat history), it becomes stored XSS and hits any viewer later. If not saved, it’s reflected DOM XSS for the current viewer.

Severity

High

CVE ID

CVE-2026-26023

Weaknesses

Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as <, >, and & that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. Learn more on MITRE.

Credits