CVE-2025-0185

8.8 HIGH

📋 TL;DR

This vulnerability in Dify Tools' Vanna module allows attackers to inject malicious queries through unsanitized user inputs, potentially leading to remote code execution. It affects systems using the langgenius/dify repository with the vulnerable Vanna module. Organizations using Dify for AI/ML workflows are at risk.

💻 Affected Systems

Products:
  • langgenius/dify repository with Vanna module
Versions: Latest version prior to patch (specific version not specified in CVE)
Operating Systems: All platforms running Python/Pandas
Default Config Vulnerable: ⚠️ Yes
Notes: Affects systems using the vn.get_training_plan_generic() function with user-controlled df_information_schema parameter.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote Code Execution (RCE) allowing full system compromise, data exfiltration, and lateral movement within the environment.

🟠

Likely Case

Data manipulation or extraction through Pandas query injection, potentially leading to information disclosure or data corruption.

🟢

If Mitigated

Limited impact with proper input validation and query sanitization in place.

🌐 Internet-Facing: HIGH - If the vulnerable endpoint is exposed to the internet, attackers can exploit it remotely without authentication.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could exploit this vulnerability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires understanding of Pandas query injection techniques and access to the vulnerable function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check latest Dify repository updates

Vendor Advisory: https://huntr.com/bounties/7d9eb9b2-7b86-45ed-89bd-276c1350db7e

Restart Required: No

Instructions:

1. Update to latest Dify repository version 2. Ensure vn.get_training_plan_generic() function properly sanitizes inputs 3. Validate all user inputs before passing to Pandas queries

🔧 Temporary Workarounds

Input Validation Workaround

all

Implement strict input validation for df_information_schema parameter

# Add input validation before calling vn.get_training_plan_generic()
# Validate df_information_schema contains only allowed characters/patterns

🧯 If You Can't Patch

  • Implement network segmentation to isolate Dify systems
  • Add WAF rules to detect and block suspicious query patterns

🔍 How to Verify

Check if Vulnerable:

Review code for unsanitized user inputs passed to vn.get_training_plan_generic() function

Check Version:

Check Dify repository version and commit history for security fixes

Verify Fix Applied:

Test that user inputs are properly validated and sanitized before Pandas query execution

📡 Detection & Monitoring

Log Indicators:

  • Unusual query patterns in Dify logs
  • Multiple failed query attempts
  • Suspicious characters in query parameters

Network Indicators:

  • Unusual outbound connections from Dify systems
  • Large data transfers following query execution

SIEM Query:

source="dify" AND (query="*;*" OR query="*|*" OR query="*&*" OR query="*$*" OR query="*`*")

🔗 References

📤 Share & Export