北京赛克艾威科技有限公司 2024-08-20
Spring Security 是Spring框架中用于处理认证和授权的子项目,@AuthorizeReturnObject 注解用于在方法返回结果后执行权限检查。 受影响版本中,当应用满足以下条件时,@PreFilter、@PostFilter、@PreAuthorize 或 @PostAuthorize 注解会失效,导致安全校验绕过: 1、使用 AnnotationAwareAspectJAutoProxyCreator 创建代理; 2、程序上下文中至少有一个 FactoryBean; 3、使用 @EnableMethodSecurity 启用方法级安全性控制; 4、使用 @AuthorizeReturnObject 注解或由 Spring Security 生成的 AuthorizationAdvisorProxyFactory @Bean 对对象进行封装。
1. 将组件 org.springframework.security:spring-security-config 升级至 6.3.2 及以上版本
https://www.oscs1024.com/hd/MPS-e849-vn3x
https://spring.io/security/cve-2024-38810
https://github.com/spring-projects/spring-security/commit/ae8e4d148ef471cc3d5c3421f3501c99d2602b15