chillzhuang / SpringBlade

SpringBlade 是一个由商业级项目升级优化而来的SpringCloud分布式微服务架构、SpringBoot单体式微服务架构并存的综合型项目,采用Java17 API重构了业务代码,完全遵循阿里巴巴编码规范。采用Spring Boot 3.2 、Spring Cloud 2023 、Mybatis 等核心技术,同时提供基于React和Vue的两个前端框架用于快速搭建企业级的SaaS多租户微服务平台。
https://bladex.cn
Apache License 2.0
6.53k stars 1.33k forks source link

[sercurity vulnerability] SQL injection #28

Open GatekeeperBuster opened 7 months ago

GatekeeperBuster commented 7 months ago

Recently, our team found a security vulnerability in the latest version of the project, which has led to the risk of SQL injection, potentially causing severe information leakage. The vulnerability lies within the method: src/main/java/org/springblade/system/user/controller/UserController.java#exportUser. image image

Developers, while operating the SQL statement through : the src/main/java/org/springblade/system/user/mapper/UserMapper.java#exportUsermethod, directly concatenated the input "ew" parameter to the SQL statement "SELECT id, tenant_id, account, name, real_name, email, phone, birthday, role_id, dept_id, post_id FROM blade_user ${ew.customSqlSegment}" using the " ${ew.customSqlSegment}" syntax. This means that attackers could control the "ew" parameter to execute SQL injection attacks.

s-chance commented 2 days ago

This is a solution: https://www.kancloud.cn/smallchill/blade-safety/3234106