dromara / lamp-cloud

lamp-cloud 支持jdk21、jdk17、jdk11、jdk8,ta基于 SpringCloud + SpringBoot 开发的微服务中后台快速开发平台,专注于多租户(SaaS架构)解决方案,亦可作为普通项目(非SaaS架构)的基础开发框架使用,目前已实现插拔式数据库隔离、SCHEMA隔离、字段隔离 等租户隔离方案。
http://tangyh.top
Apache License 2.0
5.47k stars 1.67k forks source link

[security vulnerability]SQL injection #334

Closed GatekeeperBuster closed 5 months ago

GatekeeperBuster commented 5 months ago

Recently, our team has identified a security vulnerability within the latest version of the project that has led to the occurrence of SQL injection issues, which could potentially result in a significant risk of information disclosure. The vulnerability is located in the method top/tangyh/lamp/base/controller/user/BaseEmployeeController.java#page. image

Developers, while operating the SQL statement through the top/tangyh/lamp/base/service/user/BaseEmployeeService.findPageResultVO() method, pass the input params parameter to the model via params.getModel(). image

Subsequently, the model.getRoleId() method is used to directly concatenate the role ID into the SQL statement SELECT eor.employee_id FROM base_employee_org_rel eor WHERE eor.employee_id = e.id AND eor.org_id IN model.getRoleId(). This implies that attackers could potentially control the params parameter to execute an SQL injection attack.