当前位置: 首页 > news >正文

JEEWMS issue2: `updateAuthority` 可改写角色功能权限

Vulnerability call chain

1.1 Summary

JEEWMS has a missing authorization vulnerability: updateAuthority 可改写角色功能权限. 可给角色授予或移除菜单/功能权限,影响用户后续可访问功能和授权状态。

  • Attack precondition: 攻击者能访问 roleController.do?updateAuthority。源码层面未证明该入口仅系统管理员可访问。
  • Security impact: 可给角色授予或移除菜单/功能权限,影响用户后续可访问功能和授权状态。

1.2 Exploit path

提交任意 roleIdrolefunctions,服务端删除该角色旧功能绑定并新增请求中的功能绑定。

1.3 Key code evidence

  1. src/main/java/org/jeecgframework/web/system/controller/core/RoleController.java

Evidence location: https://gitee.com/erzhongxmu/JEEWMS/blob/master/src/main/java/org/jeecgframework/web/system/controller/core/RoleController.java#L580

  577  	 * @param request578  	 * @return579  	 */580  	@RequestMapping(params = "updateAuthority")581  	@ResponseBody582  	public AjaxJson updateAuthority(HttpServletRequest request) {583  		AjaxJson j = new AjaxJson();
  1. security-reports/pure_fix_code/src/main/java/org/jeecgframework/web/system/controller/core/RoleController.java

Evidence location: https://gitee.com/erzhongxmu/JEEWMS/blob/master/security-reports/pure_fix_code/src/main/java/org/jeecgframework/web/system/controller/core/RoleController.java#L585

  582  	@ResponseBody583  	public AjaxJson updateAuthority(HttpServletRequest request) {584  		AjaxJson j = new AjaxJson();585  		try {586  			String roleId = request.getParameter("roleId");587  			String rolefunction = request.getParameter("rolefunctions");588  			String scopeMessage = validateRoleAuthorityScope(roleId, rolefunction);589  			if (scopeMessage != null) {590  				j.setSuccess(false);
  1. security-reports/pure_fix_code/src/main/java/org/jeecgframework/web/system/controller/core/RoleController.java

Evidence location: https://gitee.com/erzhongxmu/JEEWMS/blob/master/security-reports/pure_fix_code/src/main/java/org/jeecgframework/web/system/controller/core/RoleController.java#L595

  592  				return j;593  			}594  			TSRole role = this.systemService.get(TSRole.class, roleId);595  			List<TSRoleFunction> roleFunctionList = systemService596  					.findByProperty(TSRoleFunction.class, "TSRole.id",597  							role.getId());598  			Map<String, TSRoleFunction> map = new HashMap<String, TSRoleFunction>(1024);599  			for (TSRoleFunction functionOfRole : roleFunctionList) {600  				map.put(functionOfRole.getTSFunction().getId(), functionOfRole);601  			}602  			String[] roleFunctions = rolefunction.split(",");603  			Set<String> set = new HashSet<String>();
  1. security-reports/pure_fix_code/src/main/java/org/jeecgframework/web/system/controller/core/RoleController.java

Evidence location: https://gitee.com/erzhongxmu/JEEWMS/blob/master/security-reports/pure_fix_code/src/main/java/org/jeecgframework/web/system/controller/core/RoleController.java#L627

  624  		}625  		if (!helper.canManageRole(currentUser, roleId)) {626  			return "没有权限操作该角色!";627  		}628  		for (String functionId : helper.parseIds(functionIds)) {629  			if (!helper.currentUserHasFunction(currentUser, functionId)) {630  				return "没有权限授予该功能!";631  			}632  		}633  		return null;634  	}
  1. security-reports/pure_fix_code/src/main/java/org/jeecgframework/web/system/controller/core/RoleController.java

Evidence location: https://gitee.com/erzhongxmu/JEEWMS/blob/master/security-reports/pure_fix_code/src/main/java/org/jeecgframework/web/system/controller/core/RoleController.java#L639

  636  	/**637  	 * 权限比较638  	 * 639  	 * @param set640  	 *            最新的权限列表641  	 * @param role642  	 *            当前角色643  	 * @param map

3. Root Cause Analysis

Root Cause 1: Missing server-side authorization on the vulnerable operation.

The endpoint accepts user-controlled authorization-sensitive identifiers or fields, but the write/read path does not prove that the current caller may operate on the target object.

Root Cause 2: Missing object-scope or grant-bound validation.

The implementation relies on endpoint access, UI filtering, or object existence checks instead of enforcing target ownership, tenant boundary, role ceiling, or grantable-resource constraints at the service layer.

将该接口强制限制为系统管理员或明确的角色管理权限;校验当前用户可管理目标角色,且只能授予自己权限范围内的功能。

5. Verification after fix

  • Unauthorized callers receive HTTP 403 or equivalent rejection.
  • Out-of-scope target identifiers are rejected before database writes or sensitive reads.
  • Role, permission, tenant, organization, ownership, or grant-bound ceilings are enforced server-side.
  • Direct HTTP requests are rejected even when front-end controls are hidden.
http://www.jsqmd.com/news/1035855/

相关文章:

  • Linux进程创建实验详解:从fork()原理到实践应用
  • 山南市空调维修/中央空调维修|本地避坑指南,满分五星平台|欧米到家首选 - 欧米到家
  • 2026乌兰察布焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • 如何选择北京企业纠纷律所?2026年6月推荐十大排名评测专业价格注意事项案例 - 品牌推荐
  • 2026新疆焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • json模块:序列化反序列化、中文乱码、json文件读写实战
  • 如何快速获取网盘直链:2025年最新下载方案终极指南
  • 2026年 泰州水泵发电机组实力厂家:稳定高效与节能降噪技术解析及选购指南 - 品牌发掘
  • RuoYi issue3: Unauthorized Role Assignment To Users
  • 终极Windows热键冲突检测指南:Hotkey Detective让键盘快捷键重获新生
  • 2026西双版纳焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • 2026山西焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • 2026绥化焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • 2026最新教育垂直领域学科大模型与教学智能体建设方案排行 - 起跑123
  • 如何3分钟完成Adobe软件快速激活:Adobe-GenP完整使用指南
  • JEEWMS issue3: `updateDataRule` 可改写角色数据规则
  • OneNote转Markdown终极指南:如何用onenote-md-exporter实现无损格式转换
  • 2026石家庄焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • 2026锡林郭勒盟焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • 东北景区文旅对讲运维科普 淡旺季对讲机通讯设备适配与故障标准化解决方案----黑龙江单工科技有限公司 - 无线电评测大师
  • 2026石嘴山焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • SSRF 302跳转
  • 2026新乡焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • LLM上下文压缩:在有限窗口中保留关键信息的工程策略
  • 计算机毕业设计之办公耗材管理系统
  • 5年,一个程序员是如何把私有化在线客服系统做到第一名的
  • 2026延安焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • 2026乌鲁木齐焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团
  • SSRF DNS重绑定绕过法
  • 2026南阳焊缝探伤检测权威机构排行 TOP 本地高频选择,无损检测 + UT+RT+PT 检测 附电话地址 - 中安检测集团