CVE-2024-53450

7.5 HIGH

📋 TL;DR

RAGFlow 0.13.0 has an improper access control vulnerability in document-hooks.ts that allows unauthenticated attackers to access user documents. This affects all deployments running the vulnerable version. The vulnerability stems from insufficient authorization checks in the document handling hooks.

💻 Affected Systems

Products:
  • RAGFlow
Versions: 0.13.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All deployments of RAGFlow 0.13.0 are vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could access, modify, or delete all user documents in the system, potentially exposing sensitive information or disrupting operations.

🟠

Likely Case

Unauthorized users accessing documents they shouldn't have permission to view, leading to data exposure.

🟢

If Mitigated

With proper access controls, only authorized users can access documents according to their permissions.

🌐 Internet-Facing: HIGH - The vulnerability allows unauthenticated access, making internet-facing instances particularly vulnerable to exploitation.
🏢 Internal Only: MEDIUM - Internal instances are still vulnerable but have reduced attack surface compared to internet-facing deployments.

🎯 Exploit Status

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

The vulnerability is in the web interface and requires no authentication. Public proof-of-concept exists showing exploitation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: Yes

Instructions:

1. Monitor RAGFlow GitHub repository for security updates. 2. Upgrade to a patched version when available. 3. Restart the RAGFlow service after patching.

🔧 Temporary Workarounds

Network Access Restriction

linux

Restrict network access to RAGFlow to trusted IP addresses only

# Use firewall rules to restrict access
iptables -A INPUT -p tcp --dport [RAGFlow_PORT] -s [TRUSTED_IP] -j ACCEPT
iptables -A INPUT -p tcp --dport [RAGFlow_PORT] -j DROP

Authentication Proxy

all

Place RAGFlow behind an authentication proxy or reverse proxy with authentication

# Configure nginx with basic auth
location /ragflow/ {
    proxy_pass http://localhost:[RAGFlow_PORT];
    auth_basic "Restricted";
    auth_basic_user_file /etc/nginx/.htpasswd;
}

🧯 If You Can't Patch

  • Implement network segmentation to isolate RAGFlow from untrusted networks
  • Deploy a web application firewall (WAF) with authentication bypass protection rules

🔍 How to Verify

Check if Vulnerable:

Check if running RAGFlow 0.13.0 by examining version files or configuration. Test unauthenticated access to document endpoints.

Check Version:

Check package.json or version files in the RAGFlow installation directory

Verify Fix Applied:

After applying workarounds, test that unauthenticated requests to document endpoints return proper authentication errors.

📡 Detection & Monitoring

Log Indicators:

  • Unauthenticated requests to document endpoints
  • Access to /api/documents or similar endpoints without authentication headers
  • Unusual document access patterns from single IP addresses

Network Indicators:

  • HTTP requests to document endpoints without authentication tokens
  • Unusual volume of document requests from external IPs

SIEM Query:

source="ragflow" AND (uri_path="/api/documents" OR uri_path="/documents") AND NOT (http_auth_token EXISTS OR cookie EXISTS)

🔗 References

📤 Share & Export