Spring Cloud Gateway 远程代码执行漏洞(CVE-2022-22947)

高危

Spring Cloud Gateway 是 Spring Cloud 下的一个项目,该项目是基于 Spring 5.0、Spring Boot 2.0 和 Project Reactor 等技术开发的网关,它旨在为微服务架构提供一种简单有效、统一的 API 路由管理方式。

3 月 1 日,VMware 官方发布安全公告,声明对 Spring Cloud Gateway 中的一处命令注入漏洞进行了修复,漏洞编号为 CVE-2022-22947:

CVE-2022-22947 | Security | VMware Tanzu

漏洞描述

使用 Spring Cloud Gateway 的应用如果对外暴露了 Gateway Actuator 接口,则可能存在被 CVE-2022-22947 漏洞利用的风险。攻击者可通过利用此漏洞执行 SpEL 表达式,从而在目标服务器上执行任意恶意代码,获取系统权限。

影响范围

漏洞利用的前置条件:

  1. 除了 Spring Cloud Gateway 外,程序还用到了 Spring Boot Actuator 组件(它用于对外提供 /actuator/ 接口);

  2. Spring 配置对外暴露 gateway 接口,如 application.properties 配置为:

# 默认为truemanagement.endpoint.gateway.enabled=true

以逗号分隔的一系列值,默认为 health# 若包含 gateway 即表示对外提供 Spring Cloud Gateway 接口management.endpoints.web.exposure.include=gateway

漏洞影响的 Spring Cloud Gateway 版本范围:

  • Spring Cloud Gateway 3.1.x < 3.1.1

  • Spring Cloud Gateway 3.0.x < 3.0.7

  • 其他旧的、不受支持的 Spring Cloud Gateway 版本

解决方案

更新升级 Spring Cloud Gateway 到以下安全版本:

  • Spring Cloud Gateway 3.1.1

  • Spring Cloud Gateway 3.0.7

或者在不考虑影响业务的情况下禁用 Gateway actuator 接口:如application.properties 中配置 management.endpoint.gateway.enabled 为 false。

产品支持

洞鉴自定义PoC可支持检测,可咨询长亭科技技术支持人员获取解决方案。

推荐观看

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值