CVE-2024-12869
Executive Summary
CVE-2024-12869 is an improper authentication vulnerability in Infiniflow RAGFlow version v0.12.0. The flaw allows an authenticated user to view another user's invite list, leading to unauthorized disclosure of personal information such as email addresses or usernames. This data leakage can facilitate targeted phishing attacks, spam campaigns, and may result in regulatory compliance issues (e.g., GDPR, CCPA). The vulnerability has a CVSS score of 4.3 (Medium) and currently has no known public exploit or patch.
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.
No signup required
Supply Chain & Package Security
RAGFlow is a Python-based open-source Retrieval-Augmented Generation (RAG) engine. The vulnerability resides in the application layer, not in any third-party package. However, organizations using RAGFlow should verify the integrity of their deployment and monitor for any malicious modifications to the codebase.
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) – Attacker needs a valid user account.
- User Interaction (UI): None (N) – No victim action needed.
- Scope (S): Unchanged (U) – Impact confined to the vulnerable component.
- Confidentiality (C): Low (L) – Limited exposure of invite list data.
- Integrity (I): None (N) – No data modification.
- Availability (A): None (N) – No service disruption.
Threat Level: Medium. While the CVSS score is moderate, the potential for privacy breaches and downstream attacks (phishing) elevates the risk for organizations handling sensitive user data.
Deep Dive & Mechanics
The vulnerability stems from improper authentication checks in the API endpoint responsible for retrieving invite lists. In RAGFlow v0.12.0, the endpoint /api/invites (or similar) does not verify that the requesting user is authorized to view the specific invite list. Instead, it accepts a user ID parameter and returns the corresponding invite data without validating ownership or permissions.
Root Cause: The server-side code fails to enforce access control on the invite list retrieval function. The application likely uses a simple database query like SELECT * FROM invites WHERE user_id = {provided_id} without checking if the authenticated user matches {provided_id}.
Attack Scenario:
- Attacker logs in as a legitimate user (e.g.,
attacker@example.com). - Attacker enumerates or guesses other user IDs (e.g., via sequential IDs or API responses).
- Attacker sends a GET request to
/api/invites?user_id=12345(or similar). - Server returns the invite list for user ID 12345, exposing email addresses and usernames.
Vulnerable vs. Patched Code
Vulnerable Code (v0.12.0):
@app.route('/api/invites', methods=['GET'])
def get_invites():
user_id = request.args.get('user_id')
# No authentication check – returns invites for any user_id
invites = db.query("SELECT * FROM invites WHERE user_id = ?", user_id)
return jsonify(invites)
Patched Code (Hypothetical Fix):
@app.route('/api/invites', methods=['GET'])
def get_invites():
current_user_id = session.get('user_id') # From authentication middleware
requested_user_id = request.args.get('user_id')
# Enforce access control: only allow viewing own invites
if current_user_id != requested_user_id:
return jsonify({'error': 'Forbidden'}), 403
invites = db.query("SELECT * FROM invites WHERE user_id = ?", current_user_id)
return jsonify(invites)
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Valid user account on a RAGFlow instance (v0.12.0).
- Network access to the RAGFlow API.
Exploitation Steps:
- Authenticate and obtain a session token.
- Enumerate user IDs (e.g., by observing patterns in API responses or brute-forcing).
- Send a crafted request:
curl -X GET "https://target-ragflow.com/api/invites?user_id=1002" \ -H "Authorization: Bearer <attacker_token>" - Parse the response to extract email addresses and usernames.
Expected Output:
{
"invites": [
{"email": "victim@example.com", "username": "victim_user"},
{"email": "another@example.com", "username": "another_user"}
]
}
Blue Team (Detection & Response)
Detection:
- Monitor API logs for anomalous patterns: multiple requests to
/api/inviteswith varyinguser_idparameters from the same session. - Alert on requests where
user_iddoes not match the authenticated user's ID.
Response:
- Isolate the affected RAGFlow instance.
- Review access logs to identify compromised accounts.
- Notify affected users and reset their invite tokens.
- Apply a temporary WAF rule to block requests with mismatched user IDs.
Indicators of Compromise (IOCs)
- Network IOCs:
- Repeated GET requests to
/api/inviteswith differentuser_idvalues. - Source IP addresses performing user ID enumeration.
- Repeated GET requests to
- Log IOCs:
- API logs showing
user_idparameter not matching the authenticated user. - Unusual number of 200 OK responses for
/api/invitesfrom a single session.
- API logs showing
- File IOCs:
- Modified
app.pyor route handler files (if attacker gained code access).
- Modified
Detection Engineering
YARA Rule
rule CVE_2024_12869_Invite_List_Exposure {
meta:
description = "Detects exploitation attempts of CVE-2024-12869 in RAGFlow"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-12869"
strings:
$api_path = "/api/invites"
$user_id_param = "user_id="
$json_response = /"invites":\s*\[/
condition:
$api_path and $user_id_param and $json_response
}
Sigma Rule
title: CVE-2024-12869 RAGFlow Invite List Enumeration
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to enumerate invite lists via improper authentication in RAGFlow v0.12.0
author: Valters IT
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-method: 'GET'
cs-uri-stem: '/api/invites'
cs-uri-query|contains: 'user_id='
condition: selection
falsepositives:
- Legitimate admin operations (if applicable)
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-12869 RAGFlow Invite List Enumeration Attempt";
flow:to_server,established;
content:"GET"; http_method;
content:"/api/invites"; http_uri;
content:"user_id="; http_uri;
classtype:attempted-recon;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable endpoint if not critical: Block
/api/invitesat the WAF or reverse proxy level. - Apply a virtual patch using a WAF rule to validate that the
user_idparameter matches the authenticated user's ID. - Restrict API access to trusted IP ranges if possible.
Long-Term Fix:
- Upgrade to a patched version of RAGFlow once available.
- Implement proper access control checks on all API endpoints.
- Conduct a security audit of the entire application.
Compensating Controls:
- Enable detailed logging and monitoring for API abuse.
- Implement rate limiting on sensitive endpoints.
- Use multi-factor authentication (MFA) to reduce the impact of account compromise.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.