CVE-2025-69286

9.8 CRITICAL

📋 TL;DR

CVE-2025-69286 is a critical authentication bypass vulnerability in RAGFlow where API keys and beta tokens are generated using the same insecure algorithm with predictable inputs. An attacker who obtains a shared assistant/agent URL can derive the owner's personal API key, gaining full account control. All RAGFlow users running versions before 0.22.0 are affected.

💻 Affected Systems

Products:
  • RAGFlow
Versions: All versions prior to 0.22.0
Operating Systems: All operating systems running RAGFlow
Default Config Vulnerable: ⚠️ Yes
Notes: All deployments using the vulnerable token generation mechanism are affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete account takeover allowing unauthorized access to all assistant/agent data, configurations, and potentially sensitive information processed through the RAG system.

🟠

Likely Case

Unauthorized users gaining administrative access to RAGFlow instances, potentially exposing sensitive documents, embeddings, and conversation histories.

🟢

If Mitigated

Limited impact if proper network segmentation and access controls prevent unauthorized users from accessing shared URLs.

🌐 Internet-Facing: HIGH - Any internet-exposed RAGFlow instance with shared assistant/agent URLs is vulnerable to remote exploitation.
🏢 Internal Only: MEDIUM - Internal attackers with access to shared URLs could still exploit this vulnerability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires access to a shared assistant/agent URL, but once obtained, deriving the API key is straightforward due to the predictable algorithm.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.22.0

Vendor Advisory: https://github.com/infiniflow/ragflow/security/advisories/GHSA-9j5g-g4xm-57w7

Restart Required: Yes

Instructions:

1. Backup your RAGFlow data and configurations. 2. Stop the RAGFlow service. 3. Update to version 0.22.0 or later using your deployment method (Docker, Kubernetes, or direct installation). 4. Restart the service. 5. Regenerate all API keys and beta tokens.

🔧 Temporary Workarounds

Disable shared assistant/agent URLs

all

Temporarily disable the beta feature that generates shareable assistant/agent URLs to prevent token exposure.

Modify configuration to disable beta sharing features

Network isolation

all

Restrict access to RAGFlow instances to trusted networks only.

Configure firewall rules to limit access to RAGFlow ports

🧯 If You Can't Patch

  • Rotate all API keys and beta tokens immediately to invalidate potentially compromised credentials.
  • Implement strict access controls and monitoring for any shared assistant/agent URLs, logging all access attempts.

🔍 How to Verify

Check if Vulnerable:

Check your RAGFlow version. If it's below 0.22.0, you are vulnerable. Review if any shared assistant/agent URLs have been generated.

Check Version:

Check the RAGFlow web interface or deployment configuration for version information.

Verify Fix Applied:

After updating to 0.22.0, verify that new API keys and beta tokens are generated using the updated secure method and are no longer mutually derivable.

📡 Detection & Monitoring

Log Indicators:

  • Unusual API key usage patterns
  • Access from unexpected IP addresses using valid API keys
  • Multiple failed authentication attempts followed by successful access

Network Indicators:

  • Unexpected API requests to sensitive endpoints
  • Traffic patterns suggesting enumeration of shared URLs

SIEM Query:

Example: 'source="ragflow" AND (event="api_key_derived" OR event="unauthorized_access")'

🔗 References

📤 Share & Export