漏洞介绍:
Spring Cloud Gateway 是基于 Spring Framework 和 Spring Boot 构建的 API 网关,它旨在为微服务架构提供一种简单、有效、统一的 API 路由管理方式。据公告描述,其3.1.0及3.0.6版本(包含)以前存在一处SpEL表达式注入漏洞,当启用和暴露 Gateway Actuator 端点时,使用 Spring Cloud Gateway的应用程序可受到代码注入攻击。攻击者可以发送特制的恶意请求,从而远程执行任意代码。
漏洞影响版本:
Spring Cloud
Gateway>= 3.1.1
Spring Cloud
Gateway >= 3.0.7
漏洞复现:
1、首先打开vulfocus然后在首页搜索CVE-2022-22947,打开靶场
2、运行poc
python3 cve-2022-22947.py "http://123.58.236.76:46033" "ls /tmp"
影响范围
全球互联网1,107,273 条匹配结果 (742,940 条独立IP)
修复建议:
1、目前厂商已发布升级修复漏洞,请及时更新安全版本:
https://github.com/spring-cloud/spring-cloud-gateway
2、如果不需要网关执行器端点,可通过配置禁用即可。如果需要执行器,则应使用 Spring Security对其进行保护,参考链接如下:
https://docs.spring.io/spring-boot/docs/current/reference/html/
actuator.html#actuator.endpoints.security
原文始发于微信公众号(天大天财):Spring Cloud Gateway(CVE-2022-22947)RCE漏洞
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论