Spring Cloud Gateway表达式注入漏洞CVE-2025-41253
Spring CloudGateway是 Spring 生态的轻量级、高性能网关,替代 Netflix Zuul 2,可以用于统一路由、过滤、限流、鉴权等边缘服务处理。
一、基本情况
Spring CloudGateway(简称SCG)服务是基于Spring Framework 5、Project Reactor和Spring Boot 2及以上版本构建的高性能网关框架。
Spring CloudGateway 通过反应式编程模型(WebFlux)实现异步非阻塞处理,管理和路由微服务请求,用于微服务架构下的高并发场景。

Spring CloudGateway 是Spring Cloud微服务生态的重要组件之一,它提供了动态路由、负载均衡、路径重写、过滤请求、限流等等功能。
栋科技漏洞库关注到影响Spring Cloud Gateway Server(限WebFlux版本)表达式注入漏洞,追踪CVE-2025-41253,CVSS 3.X评分7.5。
二、漏洞分析
CVE-2025-41253漏洞是存在于Spring Cloud Gateway Server(仅限WebFlux版本)中的表达式注入漏洞,漏洞的潜在风险较为严重。
该漏洞使得未经授权远程攻击者可以访问到Spring Boot actuator routes时,可构造恶意请求读取系统环境变量,导致敏感信息泄露。
该漏洞利用的前提条件是:应用在路由配置中使用Spring Expression Language(SpEL)且暴露了未经访问控制的Actuator gateway端点。
此时,攻击者可通过构造恶意路由表达式,读取系统环境变量和系统属性,从而造成敏感信息泄露。
漏洞的触发条件包括:
启用management.endpoints.web.exposure.include=gateway与management.endpoint.gateway.enabled=true
(或management.endpoint.gateway.access=unrestricted),且相关Actuator接口可被外部访问。
三、影响范围
4.3.0 <= Spring Cloud Gateway < 4.3.2
4.2.0 <= Spring Cloud Gateway < 4.2.6
4.1.0 <= Spring Cloud Gateway < 4.1.12
4.0.0 <= Spring Cloud Gateway < 4.0.12
3.1.0 <= Spring Cloud Gateway < 3.1.12
较旧、不受支持的版本也会受到影响
四、修复建议
Spring Cloud Gateway >= 4.3.2
Spring Cloud Gateway >= 4.2.6
Spring Cloud Gateway >= 4.1.12
Spring Cloud Gateway >= 4.0.12
Spring Cloud Gateway >= 3.1.12
五、参考链接
管理员已设置登录后刷新可查看