Spring Cloud Gateway 代码执行漏洞复现

admin 2022年3月30日20:06:44评论75 views字数 699阅读2分19秒阅读模式

0x00 漏洞情况

当Spring Cloud Gateway启用和暴露 Gateway Actuator 端点时,使用 Spring Cloud Gateway 的应用程序可受到代码注入攻击。攻击者可以发送特制的恶意请求,从而远程执行任意代码。

0x01 受影响版本

Spring Cloud Gateway < 3.1.1 

Spring Cloud Gateway < 3.0.7 

0x02 漏洞复现

exp地址:

https://github.com/lucksec/Spring-Cloud-Gateway-CVE-2022-22947


搭建环境:

java -jar spring-cloud-gateway-demo-0.0.1-SNAPSHOT.jar

参照exp发包

Spring Cloud Gateway 代码执行漏洞复现

0x03 修复建议

临时修复建议

如果不需要网关执行器端点,则应通过 management.endpoint.gateway.enabled: false 禁用它。如果需要执行器,则应使用 Spring Security 对其进行保护,请参阅https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints.security。

通用修复建议

官方已发布安全版本,请及时下载更新,下载地址:https://github.com/spring-cloud/spring-cloud-gateway

0x04 漏洞环境

关注公众号,后台回复 spring-cloud-gateway 获取




原文始发于微信公众号(非曰安全):Spring Cloud Gateway 代码执行漏洞复现

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年3月30日20:06:44
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Spring Cloud Gateway 代码执行漏洞复现http://cn-sec.com/archives/854219.html

发表评论

匿名网友 填写信息