跳到正文

Spring Boot Devtool 默认key 远程代码执行漏洞

高危 未验证 漏洞情报EXP 公开

漏洞描述

DevTools 是 Spring Boot 开发中常用的工具,若外界可访问且未修改默认secret key的情况下,攻击者可利用默认key构造恶意请求,发送反序列化数据触发反序列化,从而执行任意代码,控制服务器。

解决建议

1、设置 spring.devtools.remote.restart.enabled 为 false,关闭Spring Boot DevTool功能
2、若暂无法关闭,建议修改相关密钥,设置 spring.devtools.remote.secret 为其他值,并妥善保管。

参考链接

https://medium.com/@sherif_ninja/springboot-devtools-insecure-deserialization-analysis-exploit-2c4ac77c285a