Spring Cloud 爆高危漏洞!!!

好好学java

共 1915字,需浏览 4分钟

 · 2022-03-19

今日推荐最适合晚上睡不着看的 8 个网站,建议收藏哦

23 种设计模式的通俗解释,虽然有点污,但是秒懂
请立即卸载这款 IDEA 插件!
SQL自动检查神器,再也不用担心SQL出错了,自动补全、回滚等功能大全
最新 955 不加班的公司名单(2022版)
来源:网络
Spring Cloud 突发漏洞
Log4j2 的核弹级漏洞刚告一段落,Spring Cloud Gateway 又突发高危漏洞,又得折腾了。。。
2022年3月1日,Spring官方发布了关于Spring Cloud Gateway的两个CVE漏洞,分别为CVE-2022-22946与CVE-2022-22947:
版本/分支/tag:3.4.X
问题描述
8e5640ea1c5a13c7192f446b4e0b6584.webp
Spring Cloud Gateway 是 Spring Cloud 下的一个项目,该项目是基于 Spring 5.0、Spring Boot 2.0 和 Project Reactor 等技术开发的网关,它旨在为微服务架构提供一种简单有效、统一的 API 路由管理方式。

漏洞1:Spring Cloud Gateway 远程代码执行漏洞(CVE-2022-22947)
3 月 1 日,VMware 官方发布安全公告,声明对 Spring Cloud Gateway 中的一处命令注入漏洞进行了修复,漏洞编号为 CVE-2022-22947:https://tanzu.vmware.com/security/cve-2022-22947
漏洞描述
使用 Spring Cloud Gateway 的应用如果对外暴露了 Gateway Actuator 端点时,则可能存在被 CVE-2022-22947 漏洞利用的风险。攻击者可通过利用此漏洞执行 SpEL 表达式,允许在远程主机上进行任意远程执行。,获取系统权限。
影响范围
漏洞利用的前置条件:
  • 除了 Spring Cloud Gateway 外,程序还用到了 Spring Boot Actuator 组件(它用于对外提供 /actuator/ 接口);
  • 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。

漏洞2:CVE-2022-22946:Spring Cloud Gateway HTTP2 不安全的 TrustManager
漏洞描述
使用配置为启用 HTTP2 且未设置密钥存储或受信任证书的 Spring Cloud Gateway 的应用程序将被配置为使用不安全的 TrustManager。这使得网关能够使用无效或自定义证书连接到远程服务。
影响范围
Spring Cloud Gateway = 3.1.0
解决方案
官方已经发布安全版本,请升级到3.1.1+
参考资料
官方已经发布安全版本,请升级到3.1.1+
  • https://tanzu.vmware.com/security/cve-2022-22946
  • https://tanzu.vmware.com/security/cve-2022-22947


最后,再给大家推荐一个GitHub项目,该项目整理了上千本常用技术PDF,技术书籍都可以在这里找到。GitHub地址:https://github.com/hello-go-maker/cs-books
电子书已经更新好了,拿走不谢,记得点一个star,持续更新中...


2e92140a2210f42e84ec51a465a38461.webp
浏览 23
点赞
评论
收藏
分享

手机扫一扫分享

举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

举报