开发者社区 > 云原生 > 中间件 > 正文

Seata中有修复漏洞的Spring Cloud Gateway Server 未授权访问漏洞吗?

Seata中有修复这个漏洞的Spring Cloud Gateway Server 未授权访问漏洞(CVE-2022-22947)吗?升级SpringCloudGateway之后,自定义的断言获取body数据失效了,起不来报错是怎么回事呀?

展开
收起
fuxixi 2022-10-08 14:57:28 2721 0
3 条回答
写回答
取消 提交回答
  • 该漏洞影响版本为3.1.0、3.0.0至3.0.6、Spring Cloud Gateway 其他已不再更新的版本。修复方案为: 1)3.1.x用户应升级到3.1.1+; 2)3.0.x用户应升级到3.0.7+; 3)如果不需要Actuator功能,可以通过management.endpoint.gateway.enable:false配置将其禁用。

    2022-11-07 08:16:03
    赞同 展开评论 打赏
  • 十分耕耘,一定会有一分收获!

    Spring Boot Actuator未授权访问漏洞 漏洞解释 这个漏洞就是可以直接通过网页地址访问到actuator的暴露的端口 例如:http://127.0.0.1:8181/actuator/env 解决方法 其实就是拦截这些Actuator的请求,不让可以直接访问到

    普通服务 https://blog.csdn.net/python15397/article/details/123931915 1.引入依赖

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    

    2.配置个配置文件 配置文件解释: 就是配了个拦截所有/actuator的前缀的请求,然后放行所有的请求(其他的看自己的需求修改)

    import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

    @Configuration @EnableWebSecurity public class MyWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        //CSRF默认支持的方法: GET|HEAD|TRACE|OPTIONS,不支持POST ,不是我们想要的,故取消CSRF防御
        http.csrf().disable();
        http.authorizeRequests()
                .antMatchers("/actuator/**").denyAll()
                .anyRequest().permitAll();
    
    }
    

    geteway 这个好像里面用了WebFlux,然后写security的配置好像不生效,用webflux的配置文件,官网好像也能找到

    2022-10-27 13:34:36
    赞同 展开评论 打赏
  • 从事java行业9年至今,热爱技术,热爱以博文记录日常工作,csdn博主,座右铭是:让技术不再枯燥,让每一位技术人爱上技术

    针对Spring Cloud Gateway的漏洞问题,Spring Cloud官方给出了解决问题的版本 image.png 其中Versions 3.1.1 and 3.0.7 were released to address the vulnerabilities.版本3.1.1和3.0.7是为了解决这些漏洞发布的版本,Spring Cloud用户应升级到2021.0.1(包括3.1.1)或2020.0.x用户应将Spring Cloud Gateway升级到3.0.7。官网漏洞声明地址:https://spring.io/blog/2022/03/01/spring-cloud-gateway-cve-reports-published

    2022-10-26 15:50:30
    赞同 展开评论 打赏

为企业提供高效、稳定、易扩展的中间件产品。

热门讨论

热门文章

相关电子书

更多
云栖社区特邀专家徐雷Java Spring Boot开发实战系列课程(第20讲):经典面试题与阿里等名企内部招聘求职面试技巧 立即下载
微服务架构模式与原理Spring Cloud开发实战 立即下载
阿里特邀专家徐雷Java Spring Boot开发实战系列课程(第18讲):制作Java Docker镜像与推送到DockerHub和阿里云Docker仓库 立即下载