{"id":7658,"date":"2018-08-27T21:16:24","date_gmt":"2018-08-27T21:16:24","guid":{"rendered":"http:\/\/blog.nsfocusglobal.com\/?p=1548"},"modified":"2025-07-09T07:11:14","modified_gmt":"2025-07-09T07:11:14","slug":"technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057","status":"publish","type":"post","link":"https:\/\/nsfocusglobal.com\/pt-br\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/","title":{"rendered":"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057)"},"content":{"rendered":"<p>On August 22, 2018, Beijing time, Apache Software Foundation (ASF) released a security bulletin, announcing a remote code execution vulnerability (CVE-2018-11776, CNVD-2018-15894, or CNNVD-201808-740) in Apache Struts 2. This vulnerability exists in either of the following cases:<\/p>\n<ol>\n<li>The namespace value is not set for a result defined in underlying XML configurations. Also, upper action configurations either lack a namespace or have a wildcard namespace.<\/li>\n<li>A URL tag, which does not have the value and action set, is used. At the same time, upper action configurations contain no namespace or have a wildcard namespace.<\/li>\n<\/ol>\n<p>For details, visit the following link:<a href=\"https:\/\/cwiki.apache.org\/confluence\/display\/WW\/S2-057\">https:\/\/cwiki.apache.org\/confluence\/display\/WW\/S2-057<\/a><\/p>\n<p><strong>Affected Versions<\/strong><\/p>\n<ul>\n<li>Struts 2.3\u20132.3.34<\/li>\n<li>Struts 2.5\u20132.5.16<\/li>\n<\/ul>\n<p><strong>Unaffected Versions<\/strong><\/p>\n<ul>\n<li>Struts 2.3.35<\/li>\n<li>Struts 2.5.17<\/li>\n<\/ul>\n<h2><strong>Technical Solution<\/strong><\/h2>\n<p><strong>Version Detection<\/strong><\/p>\n<ul>\n<li>Configuration File Detection<\/li>\n<\/ul>\n<p>This vulnerability exists in Struts components of old versions. Application systems that employ such components are prone to remote attacks. Therefore, application developers are advised to check whether Struts components in use are vulnerable.<\/p>\n<p>You can check the version of Struts components in the Maven configuration file <strong>pom.xml<\/strong>:<\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td>&lt;dependency&gt;<\/p>\n<p>&lt;groupId&gt;org.apache.struts&lt;\/groupId&gt;<\/p>\n<p>&lt;artifactId&gt;struts2-core&lt;\/artifactId&gt;<\/p>\n<p>&lt;version&gt;2.5.13&lt;\/version&gt;<\/p>\n<p>&lt;\/dependency&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>If the component version, as indicated in red in the preceding figure, is vulnerable, please upgrade Struts 2 to the latest version for long-term effective protection.<\/p>\n<ul>\n<li>Component Name Detection<\/li>\n<\/ul>\n<p>In the Linux system, you can run the following command to find the current struts2-core package. Amid the command output, the struts2-core package name contains the version name. You can check whether this version is vulnerable. If yes, please upgrade Struts 2 to the latest version.<\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td>find \/ -name struts2-core-*.jar<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Vulnerable-in-Linux.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-1549\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Vulnerable-in-Linux.png\" alt=\"\" width=\"574\" height=\"137\" \/><\/a><\/p>\n<p><strong>Official Fix<\/strong><\/p>\n<p>ASF has fixed this vulnerability in the latest versions. Users of this software are advised to upgrade 2.3.* to 2.3.35 or 2.5.* to 2.5.17 by downloading the new versions from the following links:<\/p>\n<p>Struts2.3.35: <a href=\"http:\/\/mirrors.hust.edu.cn\/apache\/struts\/2.3.35\/struts-2.3.35-all.zip\">http:\/\/mirrors.hust.edu.cn\/apache\/struts\/2.3.35\/struts-2.3.35-all.zip<\/a><\/p>\n<p>Struts2.5.17: <a href=\"http:\/\/mirrors.hust.edu.cn\/apache\/struts\/2.5.17\/struts-2.5.17-all.zip\">http:\/\/mirrors.hust.edu.cn\/apache\/struts\/2.5.17\/struts-2.5.17-all.zip<\/a><\/p>\n<p>Workaround<\/p>\n<p>Check Struts 2&#8217;s all configuration files, including struts.xml, to see if there are package nodes without namespace. If yes, define namespace for them.<\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td>&lt;package name=&#8221;user&#8221; namespace=&#8221;\/user&#8221; extends=&#8221;struts-default&#8221;&gt;<\/p>\n<p>&lt;action name=&#8221;login&#8221;&gt;<\/p>\n<p>&lt;\/action&gt;<\/p>\n<p>&lt;\/package&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>NSFOCUS&#8217;s Recommendations<\/strong><\/p>\n<ol>\n<li>Using NSFOCUS&#8217;s Detection Product or Service to Detect the Vulnerability<\/li>\n<\/ol>\n<p>For Internet-facing assets, use the emergency vulnerability detection service of NSFOCUS Cloud to check for the vulnerability online. The service is available at the following link:<\/p>\n<ul>\n<li>For a mobile device: <a href=\"https:\/\/cloud.nsfocus.com\/megi\/holes\/hole_struts2_2018_8_23.html\">https:\/\/cloud.nsfocus.com\/megi\/holes\/hole_struts2_2018_8_23.html<\/a><\/li>\n<li>For a PC:<a href=\"https:\/\/cloud.nsfocus.com\/#\/krosa\/views\/initcdr\/productandservice?service_id=1026\">https:\/\/cloud.nsfocus.com\/#\/krosa\/views\/initcdr\/productandservice?service_id=1026<\/a><\/li>\n<\/ul>\n<p>For internal assets, use NSFOCUS NIDS, RSAS V5 and V6, and WVSS to check for the vulnerability:<\/p>\n<ul>\n<li>NSFOCUS Intrusion Detection System (NIDS)\u00a0 <a href=\"http:\/\/update.nsfocus.com\/update\/listIds\">http:\/\/update.nsfocus.com\/update\/listIds<\/a><\/li>\n<li>Remote Security Assessment System (RSAS V5) <a href=\"http:\/\/update.nsfocus.com\/update\/listAurora\/v\/5\">http:\/\/update.nsfocus.com\/update\/listAurora\/v\/5<\/a><\/li>\n<li>Remote Security Assessment System (RSAS V6) <a href=\"http:\/\/update.nsfocus.com\/update\/listRsasDetail\/v\/vulweb\">http:\/\/update.nsfocus.com\/update\/listRsasDetail\/v\/vulweb<\/a><\/li>\n<li>Web Vulnerability Scanning System (WVSS)<a href=\"http:\/\/update.nsfocus.com\/update\/listWvssDetail\/v\/6\/t\/plg\">\u00a0http:\/\/update.nsfocus.com\/update\/listWvssDetail\/v\/6\/t\/plg<\/a><\/li>\n<li>Unified Threat Sensor (UTS) <a href=\"http:\/\/update.nsfocus.com\/update\/listBsaUtsDetail\/v\/rule2.0.0\">\u00a0http:\/\/update.nsfocus.com\/update\/listBsaUtsDetail\/v\/rule2.0.0<\/a><\/li>\n<\/ul>\n<p>Users should upgrade devices to the latest version by downloading upgrade packages from the preceding links before using them to detect vulnerabilities.<\/p>\n<p>2. Using NSFOCUS&#8217;s Protection Product to Protect Against the Vulnerability<\/p>\n<ul>\n<li>NSFOCUS Network Intrusion Prevention System (NIPS) <a href=\"http:\/\/update.nsfocus.com\/update\/listIps\">http:\/\/update.nsfocus.com\/update\/listIps<\/a><\/li>\n<li>NSFOCUS Next-Generation Firewall (NF) <a href=\"http:\/\/update.nsfocus.com\/update\/listNf\">http:\/\/update.nsfocus.com\/update\/listNf<\/a><\/li>\n<li>NSFOCUS Web Application Firewall (WAF) <a href=\"http:\/\/update.nsfocus.com\/update\/wafIndex\">http:\/\/update.nsfocus.com\/update\/wafIndex<\/a><\/li>\n<\/ul>\n<p>3. Upgrade Package\/Rule Base Versions of Detection and Protection Products<\/p>\n<table width=\"529\">\n<thead>\n<tr>\n<td width=\"188\"><strong>Detection Product<\/strong><\/td>\n<td width=\"378\"><strong>Upgrade Package\/Rule Base Version<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td width=\"188\">NIDS<\/td>\n<td width=\"378\">V5.6.7.732, V5.6.8.732, V5.6.9.18479, V5.6.10.18479<\/td>\n<\/tr>\n<tr>\n<td width=\"188\">RSAS V5&#8217;s web plug-in package<\/td>\n<td width=\"378\">V051758<\/td>\n<\/tr>\n<tr>\n<td width=\"188\">RSAS V6&#8217;s web plug-in package<\/td>\n<td width=\"378\">V6.0R02F00.1004<\/td>\n<\/tr>\n<tr>\n<td width=\"188\">WVSS V6&#8217;s web plug-in package<\/td>\n<td width=\"378\">V6.0R03F00.113<\/td>\n<\/tr>\n<tr>\n<td width=\"188\">UTS<\/td>\n<td width=\"378\">V5.6.10.18479<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table width=\"529\">\n<thead>\n<tr>\n<td width=\"188\"><strong>Protection Product<\/strong><\/td>\n<td width=\"378\"><strong>Upgrade Package\/Rule Base Version<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td width=\"188\">NIPS<\/td>\n<td width=\"378\">V5.6.7.732, V5.6.8.732, V5.6.9.18479, V5.6.10.18479<\/td>\n<\/tr>\n<tr>\n<td width=\"188\">NF<\/td>\n<td width=\"378\">V5.6.7.732, V6.0.1.732<\/td>\n<\/tr>\n<tr>\n<td width=\"188\">WAF<\/td>\n<td width=\"378\">V6.0.5.1.39591, V6.0.7.0.39590, V6.0.6.1.39589<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For details, see &#8220;Appendix: Product Use Guides&#8221;.<\/p>\n<h2>Technical Anlaysis<\/h2>\n<p><strong>Patch Comparison<\/strong><\/p>\n<p>As shown in the following figure, the newly released patch mainly has the cleanNamespaceName method added to check the validity of the namespace names against a whitelist. The official vulnerability description and remediation solution reveal that this vulnerability is an OGNL expression injection vulnerability.<\/p>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Patch-released.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1550\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Patch-released.png\" alt=\"\" width=\"727\" height=\"348\" \/><\/a><\/p>\n<p><strong>Dynamic Analysis<\/strong><\/p>\n<p>A few hours after the vulnerability release, the vulnerability discoverer announced the entire vulnerability discovery process, giving a detailed analysis of the vulnerability. For details, visit the following link: <a href=\"https:\/\/lgtm.com\/blog\/apache_struts_CVE-2018-11776\">https:\/\/lgtm.com\/blog\/apache_struts_CVE-2018-11776<\/a><\/p>\n<p>This blog post uses the Apache Struts 2 showcase project as an example. The <strong>struts-actionchainin<\/strong>g<strong>.xml<\/strong> file is modified as follows:<\/p>\n<ol>\n<li>&lt;struts&gt;<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;package name=&#8221;actionchaining&#8221; extends=&#8221;struts-default&#8221; &gt;<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;action name=&#8221;actionChain1&#8243; class=&#8221;org.apache.struts2.showcase.actionchaining.ActionChain1&#8243;&gt;<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;result type=&#8221;redirectAction&#8221;&gt;<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;param name = &#8220;actionName&#8221;&gt;register2&lt;\/param&gt;<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/result&gt;<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/action&gt;<\/li>\n<li>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/package&gt;<\/li>\n<\/ol>\n<ol start=\"9\">\n<li>&lt;\/struts&gt;<\/li>\n<\/ol>\n<p>In this case, all requests to actionChain1.action are redirected to register2. Also, the ServletActionRedirectResult.execute method in the execution chain is invoked. See the following figure.<\/p>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Redirected-and-invoked.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1551\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Redirected-and-invoked.png\" alt=\"\" width=\"995\" height=\"363\" \/><\/a><\/p>\n<p>As shown in the preceding figure, the tmpLocation dictionary, contaminated by the namespace field, is set as a proof of concept (PoC) which is scheduled to execute. This is why the namespace field needs to be sanitized. Following up the namespace field, we can see the execution of the StrutsResultSupport.execute method in the execution chain, i.e., the parent class of the parent class of ServletActionRedirectResult.<\/p>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/execution-chain.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1552\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/execution-chain.png\" alt=\"\" width=\"677\" height=\"91\" \/><\/a><\/p>\n<p>As the conditionParse method, which uses OGNL expressions for data calculation, is widely used in Apache Struts 2, historical vulnerabilities concerning OGNL expressions should also be deemed to exist in this method. Of course, it is ASP that should be primarily responsible for vulnerabilities in its products. However, what it actually does is fix individual vulnerabilities that are reported without eradicating the root problem. The conditionParse method is implemented as follows:<\/p>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/ConditionParse.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1553\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/ConditionParse.png\" alt=\"\" width=\"687\" height=\"198\" \/><\/a><\/p>\n<p>As shown in the preceding figure, the conditionParse method also uses the TextParseUtil.translateVariables method. Continuing tracking the execution process, we can see the execution of the &#8220;evaluate&#8221; method in OgnlTextParser in the call stack. Specifically, the &#8220;evaluate&#8221; method first checks whether the expression passed to the &#8220;evaluate&#8221; method is valid, for example, checking for the existence of the ${} or %{} pair, before invoking evaluator.evaluate for evaluation. The complicated evaluation process is an execution chain on the whole. The following figure shows how the call stack works.<\/p>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/how-the-call-stack-works-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1555\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/how-the-call-stack-works-1.png\" alt=\"\" width=\"554\" height=\"381\" srcset=\"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/how-the-call-stack-works-1.png 554w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/how-the-call-stack-works-1-300x206.png 300w\" sizes=\"(max-width: 554px) 100vw, 554px\" \/><\/a><\/p>\n<p>As shown in the preceding figure, at the top is the execution of the constructor function of ProcessBuilder through reflection. In the middle are some operations performed during chain execution.<br \/>\nLet&#8217;s take a look at parameters which are used during evaluation for OGNL security enhancement.<\/p>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/parameters-in-evaluation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1557\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/parameters-in-evaluation.png\" alt=\"\" width=\"559\" height=\"483\" \/><\/a><\/p>\n<p>The point is that the following classes are added to the blacklist:<\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td>\u00a0\u00a0\u00a0 class ognl.DefaultMemberAccess<\/p>\n<p>class com.opensymphony.xwork2.ognl.SecurityMemberAccess<\/p>\n<p>class java.lang.ProcessBuilder<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>At last, the calculator is displayed as shown below, representing a successful RCE vulnerability exploit.<\/p>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/RCE-exploit-succeeds.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1558\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/RCE-exploit-succeeds.png\" alt=\"\" width=\"922\" height=\"360\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>Appendix\uff1a Product Use Guides<\/h2>\n<p><strong>Custom Rule Configuration on WAF<\/strong><\/p>\n<p>Users can do as follows to configure a custom rule:<\/p>\n<ul>\n<li>On WAF under <strong>Security Management &gt; Rule Database Management &gt; Custom Rules &gt; Custom<\/strong>, click <strong>Create<\/strong>.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Create-a-custom-rule-in-WAF.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1560\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Create-a-custom-rule-in-WAF.png\" alt=\"\" width=\"1021\" height=\"552\" \/><\/a><\/p>\n<ul>\n<li>Set the name of the custom rule to <strong>s2-057<\/strong>.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Set-a-name-for-the-rule.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1561\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Set-a-name-for-the-rule.png\" alt=\"\" width=\"659\" height=\"420\" \/><\/a><\/p>\n<ul>\n<li>Set other parameters as follows and then click <strong>OK<\/strong>:<\/li>\n<\/ul>\n<p>Inspection Object: URI-path<\/p>\n<p>Matching Relationship: Regular Expression Including<\/p>\n<p>Inspection Value: java\\.lang\\.(Runtime|ProcessBuilder)<\/p>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Other-configurations.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1562\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Other-configurations.png\" alt=\"\" width=\"662\" height=\"499\" \/><\/a><\/p>\n<p>After the configuration, constraints are displayed, as shown in the red frame of the following figure.<\/p>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/constraints.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1563\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/constraints.png\" alt=\"\" width=\"639\" height=\"295\" srcset=\"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/constraints.png 639w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/constraints-300x138.png 300w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><\/a><\/p>\n<ul>\n<li>Create a custom policy by clicking <strong>Create under Security Management &gt; Policy Management &gt; Policy Type &gt; Others &gt; Custom Policy<\/strong>.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Create-a-custom-policy.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1564\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Create-a-custom-policy.png\" alt=\"\" width=\"1170\" height=\"678\" srcset=\"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Create-a-custom-policy.png 1170w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Create-a-custom-policy-300x174.png 300w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Create-a-custom-policy-1024x593.png 1024w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Create-a-custom-policy-768x445.png 768w\" sizes=\"(max-width: 1170px) 100vw, 1170px\" \/><\/a><\/p>\n<ul>\n<li>Type <strong>s2-057<\/strong> as the policy name, select the newly created <strong>s2-057<\/strong> rule from the rule list, and then click <strong>OK<\/strong>.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Name-custom-policy.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1565\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Name-custom-policy.png\" alt=\"\" width=\"469\" height=\"512\" srcset=\"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Name-custom-policy.png 469w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Name-custom-policy-275x300.png 275w\" sizes=\"(max-width: 469px) 100vw, 469px\" \/><\/a><\/p>\n<ul>\n<li>Apply the newly created custom policy to the website to be protected by choosing <strong>Security Management &gt; Website Protection &gt;<\/strong> <em>Website to be protected<\/em> <strong>&gt; Web Security Protection<\/strong>.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Apply-the-policy.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1566\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Apply-the-policy.png\" alt=\"\" width=\"1096\" height=\"665\" \/><\/a><\/p>\n<ul>\n<li>In the <strong>Others<\/strong> area, select the custom policy <strong>s2-057<\/strong> and click <strong>OK<\/strong>. Then WAF can provide protection for the specific website according to the custom rule.<\/li>\n<li><\/li>\n<\/ul>\n<p><strong>Protection Configuration on WAF<\/strong><\/p>\n<ul>\n<li>Download the rule base update from the following link:<\/li>\n<\/ul>\n<p><a href=\"http:\/\/update.nsfocus.com\/update\/downloads\/id\/22273\">http:\/\/update.nsfocus.com\/update\/downloads\/id\/22273<\/a><\/p>\n<p><a href=\"http:\/\/update.nsfocus.com\/update\/downloads\/id\/19090\">http:\/\/update.nsfocus.com\/update\/downloads\/id\/19090<\/a><\/p>\n<ul>\n<li>On WAF, choose <strong>System Management &gt; System Tools &gt; Rule Upgrade<\/strong>.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Rule-upgrade.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1567\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Rule-upgrade.png\" alt=\"\" width=\"1248\" height=\"510\" srcset=\"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Rule-upgrade.png 1248w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Rule-upgrade-300x123.png 300w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Rule-upgrade-1024x418.png 1024w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Rule-upgrade-768x314.png 768w\" sizes=\"(max-width: 1248px) 100vw, 1248px\" \/><\/a><\/p>\n<ul>\n<li>In the <strong>Manual Upgrade<\/strong> area, browse to the update file and click <strong>Submit<\/strong>.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Protection Configuration on NIPS<\/strong><\/p>\n<p>NIPS users can address this vulnerability by updating the rule base. The procedure is as follows:<\/p>\n<ul>\n<li>Download the latest rule base of NIPS from the official website. Following is a link to the latest rule base for NIPS V5.6.10:<\/li>\n<\/ul>\n<p><a href=\"http:\/\/update.nsfocus.com\/update\/downloads\/id\/22260\">http:\/\/update.nsfocus.com\/update\/downloads\/id\/22260<\/a><\/p>\n<p><a href=\"http:\/\/update.nsfocus.com\/update\/downloads\/id\/21006\">http:\/\/update.nsfocus.com\/update\/downloads\/id\/21006<\/a><\/p>\n<ul>\n<li>On NIPS, under <strong>System &gt; System Update &gt; Offline Update<\/strong>, browse to the update file just downloaded and click <strong>Upload<\/strong>.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Upload.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1568\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Upload.png\" alt=\"\" width=\"941\" height=\"558\" srcset=\"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Upload.png 941w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Upload-300x178.png 300w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Upload-768x455.png 768w\" sizes=\"(max-width: 941px) 100vw, 941px\" \/><\/a><\/p>\n<ul>\n<li>After the update is installed, find the rule by ID 24298 in the default rule base and view rule details.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Upgraded.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1569\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Upgraded.png\" alt=\"\" width=\"720\" height=\"441\" srcset=\"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Upgraded.png 720w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Upgraded-300x184.png 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>Note:<\/p>\n<p>After the update is installed, the engine automatically restarts to make it take effect, which does not disconnect any sessions, but may cause the loss of three to five packets during ping operations. Therefore, it is recommended that the update be installed at an appropriate time.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Scanning Configuration on WVSS<\/strong><\/p>\n<p>WVSS users should download and install the latest plug-in to address this vulnerability. The procedure is as follows:<\/p>\n<ul>\n<li>Download the latest plug-in of WVSS from the official website. Following is a link to the latest plug-in for WVSS V6.0: <a href=\"http:\/\/update.nsfocus.com\/update\/downloads\/id\/22283\">http:\/\/update.nsfocus.com\/update\/downloads\/id\/22283<\/a><\/li>\n<li>On WVSS, under <strong>Services &gt; System Upgrade<\/strong>, in the <strong>Manual Upgrade<\/strong> area, click <strong>Browse<\/strong> to find the update file just downloaded.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/WVSS-Upgrade.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1570\" src=\"https:\/\/staging.nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/WVSS-Upgrade.png\" alt=\"\" width=\"1189\" height=\"662\" srcset=\"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/WVSS-Upgrade.png 1189w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/WVSS-Upgrade-300x167.png 300w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/WVSS-Upgrade-1024x570.png 1024w, https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/WVSS-Upgrade-768x428.png 768w\" sizes=\"(max-width: 1189px) 100vw, 1189px\" \/><\/a><\/p>\n<ul>\n<li>Click <strong>Upgrade<\/strong>.<\/li>\n<li>Wait for the installation to complete. Then create a custom scanning template to scan the system for this vulnerability.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>NSFOCUS Threat Situation Awareness Platform (TSA)<\/strong><\/p>\n<p>Access BSA and then select Rule Engine and create a network intrusion detection rule, with parameters as follows:<\/p>\n<ul>\n<li>Mode: Expert<\/li>\n<li>Category: Network intrusion<\/li>\n<li>SQL: select sip, dip, sum(last_times) as atk_count, sip, dip, min(timestamp) as start_time, max(timestamp) as end_time, concat_agg(related_id_list) as related_id_list from internal_app_bsaips.ipslog where rule_id =24298 group by sip, dip<\/li>\n<\/ul>\n<p>Click <strong>Next<\/strong> and then set parameters as follows on the <strong>Attribute Configuration<\/strong> page<\/p>\n<ul>\n<li>Name: struts_057 vulnerability attack<\/li>\n<li>Risk Level: High<\/li>\n<li>Phase: Exploitation<\/li>\n<li>Timeout: 1800 (default)<\/li>\n<li>Duration: 3600 (default)<\/li>\n<li>Merged Attribute: sip, dip<\/li>\n<li>Event Type: System intrusion \u2013 exploit<\/li>\n<li>Rule Description: This event is an attack launched by exploiting a struts 2 vulnerability.<\/li>\n<li>Recommendation: An attack initiated by our own assets indicates that such assets have been compromised. If an attack targets our assets deployed with the struts service, please check whether such assets contain the vulnerability described in event details.<\/li>\n<\/ul>\n<p>Click <strong>Complete<\/strong> to complete configuration of the network instruction detection rule and enable the rule in the rule list.<\/p>\n<p>Create a website security rule as follows:<\/p>\n<ul>\n<li>Mode: Expert<\/li>\n<li>Category: Website security<\/li>\n<li>SQL: select sip\uff0cdip,LOWER(protocol_type) as protocol_type,LOWER(domain) as domain,dport as dport ,uri as uri ,event_type as event_type_sub,min(timestamp) as start_time,max(timestamp) as end_time,sum(count_num) as atk_count,concat_agg(related_id_list) as related_id_list from internal_app_bsawss.waf_webseclog where rule_id =27004870 group by sip,dip,protocol_type,domain,dport,uri,event_type<\/li>\n<\/ul>\n<p>Click <strong>Next<\/strong> and then set parameters as follows on the <strong>Attribute Configuration<\/strong> page<\/p>\n<ul>\n<li>Name: struts_057 vulnerability attack<\/li>\n<li>Risk Level: Medium<\/li>\n<li>Phase: Exploitation<\/li>\n<li>Timeout: 1800 (default)<\/li>\n<li>Duration: 3600 (default)<\/li>\n<li>Merged Attribute: sip, dip, protocol_type, domain, dport, uri<\/li>\n<li>Event Type: System intrusion \u2013 exploit<\/li>\n<li>Rule Description: This event is an attack launched by exploiting a struts 2 vulnerability.<\/li>\n<li>Recommendation: An attack initiated by our own assets indicates that such assets have been compromised. If an attack targets our assets deployed with the struts service, please check whether such assets contain the vulnerability described in event details.<\/li>\n<\/ul>\n<p>Click <strong>Complete<\/strong> to complete configuration of the website security rule and enable the rule in the rule list.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>NSFOCUS Enterprise Security Platform (ESP)<\/strong><\/p>\n<p>Update the &#8220;Apache struts 2 vulnerability exploitation&#8221; rule:<\/p>\n<ul>\n<li>Log in to ESP, choose <strong>Security Analysis &gt; Event Rules<\/strong>, find the rule regarding Apache struts 2 vulnerability exploitation, and then click the edit button.<\/li>\n<li>In the <strong>Rule Configuration<\/strong> area, click <strong>Set<\/strong>.<\/li>\n<li>In the <strong>Filtering Conditions<\/strong> dialog box, add a rule ID <strong>27004870<\/strong> and click <strong>OK<\/strong> to close the dialog box.<\/li>\n<li>Click <strong>OK <\/strong>to complete configuration.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>NSFOCUS Threat Analysis and Management Platform (TAM, New Version)<\/strong><\/p>\n<p>Editing the &#8220;Apache struts 2 Vulnerability Attack Event&#8221; Rule<\/p>\n<p>Note: If UTS has been upgraded, you can directly modify contents of the &#8220;Apache struts 2 vulnerability attack event&#8221; node by adding the latest rule of UTS regarding the struts 2 (S2-057) vulnerability.<\/p>\n<ul>\n<li>Navigate to the rule configuration file (\/home\/bsauser\/BSA\/apps\/bsa_tam2\/conf) on TAM, back up <strong>mergeconf.xml<\/strong>, and then open this file by using vi.<\/li>\n<li>Use \/struts 2 to find the &#8220;Apache struts 2 vulnerability attack event&#8221; node. Add <strong>24298<\/strong> in the parentheses following <strong>rule_id in<\/strong> and save the changes. Then the rule automatically takes effect.<\/li>\n<\/ul>\n<p>Creating a Custom Scenario<\/p>\n<p>Note: If UTS has not been upgraded or you want to trace previous exploitation of the struts 2 vulnerability (S2-057), you can use the custom scenario function of TAM.<\/p>\n<ul>\n<li>Access BSA and select the TAM app. Then choose <strong>Scenario Management &gt; Scenario Configuration &gt; Custom Scenario<\/strong> and click <strong>New<\/strong>.<\/li>\n<li>After creating a custom scenario, edit it by adding the following content in SQL format (<strong>Traceback Scope<\/strong> and <strong>Traceback Start Time<\/strong> can be modified) and then click <strong>OK<\/strong>:<\/li>\n<\/ul>\n<p>select sip,dip,-1 as sport,dport,min(timestamp) as start_time,max(timestamp) as end_time,first_value(sip_int) as sipv4_int,first_value(srccountryname) as src_country,first_value(srcsubdivisionname) as src_province,first_value(srccityname) as src_city,first_value(dip_int) as dipv4_int,first_value(dstcountryname) as dst_country,first_value(dstsubdivisionname) as dst_province,first_value(dstcityname) as dst_city from internal_app_bsatam2.tam_httplog where method=&#8217;GET&#8217; and (uri like &#8216;%java.lang.Runtime%&#8217; or uri like &#8216;%java.lang.ProcessBuilder%&#8217;) group by sip,dip,dport<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Scanning Configuration on RSAS<\/strong><\/p>\n<p>RSAS users should visit the following link to download the latest plug-in to address this vulnerability.<\/p>\n<p>The following is a link to the latest rule base that contains the S2-057 rule for RSAS V6.0 users:<\/p>\n<p><a href=\"http:\/\/update.nsfocus.com\/update\/downloads\/id\/22281\">http:\/\/update.nsfocus.com\/update\/downloads\/id\/22281<\/a><\/p>\n<p><a href=\"http:\/\/update.nsfocus.com\/update\/downloads\/id\/21006\">http:\/\/update.nsfocus.com\/update\/downloads\/id\/21006<\/a><\/p>\n<ul>\n<li>On RSAS, under <strong>Services &gt; System Upgrade<\/strong>, click <strong>Select File<\/strong> in the <strong>Manual Upgrade<\/strong> area and find the update file just downloaded.<\/li>\n<li>Click <strong>Upgrade<\/strong>.<\/li>\n<li>Wait for the installation to complete. Then create a custom scanning template to scan the system for this vulnerability.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Detection Configuration on UTS<\/strong><\/p>\n<ul>\n<li>Download the latest rule update of UTS from the following link: <a href=\"http:\/\/update.nsfocus.com\/update\/downloads\/id\/22290\">http:\/\/update.nsfocus.com\/update\/downloads\/id\/22290<\/a><\/li>\n<li>On UTS, under <strong>System &gt; System Upgrade &gt; Offline Upgrade<\/strong>, browse to the update file just downloaded and click <strong>Upload<\/strong>.<\/li>\n<li>Wait for the installation to complete.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>Protection Configuration on NF<\/strong><\/p>\n<p>NF has added a rule in its rule base to address this vulnerability. Users should update the rule base as soon as possible after obtaining the latest version from the following link: <a href=\"http:\/\/update.nsfocus.com\/update\/downloads\/id\/22276\">http:\/\/update.nsfocus.com\/update\/downloads\/id\/22276<\/a><\/p>\n<p>To install the update, perform the following procedure:<\/p>\n<ul>\n<li>Download the latest rule base of NF from the official website. Following is a link to the latest rule base for NF V6.0.1: <a href=\"http:\/\/update.nsfocus.com\/update\/listNewNfDetail\/v\/rule6.0.1\">http:\/\/update.nsfocus.com\/update\/listNewNfDetail\/v\/rule6.0.1<\/a><\/li>\n<li>On NF, under <strong>System &gt; System Upgrade &gt; Offline Upgrade<\/strong>, browse to the update file and click <strong>Upload<\/strong>.<\/li>\n<li>Wait for the installation to complete.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>On August 22, 2018, Beijing time, Apache Software Foundation (ASF) released a security bulletin, announcing a remote code execution vulnerability (CVE-2018-11776, CNVD-2018-15894, or CNNVD-201808-740) in Apache Struts 2. This vulnerability exists in either of the following cases: The namespace value is not set for a result defined in underlying XML configurations. Also, upper action configurations [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1577,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-7658","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-emergency-response"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057) - NSFOCUS<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057) - NSFOCUS\" \/>\n<meta property=\"og:description\" content=\"On August 22, 2018, Beijing time, Apache Software Foundation (ASF) released a security bulletin, announcing a remote code execution vulnerability\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/\" \/>\n<meta property=\"og:site_name\" content=\"NSFOCUS\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-27T21:16:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-09T07:11:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Screen-Shot-2018-08-27-at-14.22.12.png\" \/>\n<meta name=\"author\" content=\"NSFOCUS\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057) - NSFOCUS\" \/>\n<meta name=\"twitter:description\" content=\"On August 22, 2018, Beijing time, Apache Software Foundation (ASF) released a security bulletin, announcing a remote code execution vulnerability\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Screen-Shot-2018-08-27-at-14.22.12.png\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"NSFOCUS\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/\"},\"author\":{\"name\":\"NSFOCUS\",\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/#\\\/schema\\\/person\\\/fd9ab61c9c77a81bbd870f725cc0c61d\"},\"headline\":\"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057)\",\"datePublished\":\"2018-08-27T21:16:24+00:00\",\"dateModified\":\"2025-07-09T07:11:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/\"},\"wordCount\":2613,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/nsfocusglobal.com\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/Screen-Shot-2018-08-27-at-14.22.12.png\",\"articleSection\":[\"Blog\",\"Emergency Response\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/\",\"url\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/\",\"name\":\"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057) - NSFOCUS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/nsfocusglobal.com\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/Screen-Shot-2018-08-27-at-14.22.12.png\",\"datePublished\":\"2018-08-27T21:16:24+00:00\",\"dateModified\":\"2025-07-09T07:11:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/#primaryimage\",\"url\":\"https:\\\/\\\/nsfocusglobal.com\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/Screen-Shot-2018-08-27-at-14.22.12.png\",\"contentUrl\":\"https:\\\/\\\/nsfocusglobal.com\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/Screen-Shot-2018-08-27-at-14.22.12.png\",\"width\":598,\"height\":322,\"caption\":\"Struts logo on a blue background.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nsfocusglobal.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/#website\",\"url\":\"https:\\\/\\\/nsfocusglobal.com\\\/\",\"name\":\"NSFOCUS\",\"description\":\"Security Made Smart and Simple\",\"publisher\":{\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/nsfocusglobal.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/#organization\",\"name\":\"NSFOCUS\",\"url\":\"https:\\\/\\\/nsfocusglobal.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/nsfocusglobal.com\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/logo-ns.png\",\"contentUrl\":\"https:\\\/\\\/nsfocusglobal.com\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/logo-ns.png\",\"width\":248,\"height\":36,\"caption\":\"NSFOCUS\"},\"image\":{\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nsfocusglobal.com\\\/#\\\/schema\\\/person\\\/fd9ab61c9c77a81bbd870f725cc0c61d\",\"name\":\"NSFOCUS\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d3dc987908fc59791d261b1006d84eb931d15287261476b9384e690ed0c568de?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d3dc987908fc59791d261b1006d84eb931d15287261476b9384e690ed0c568de?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d3dc987908fc59791d261b1006d84eb931d15287261476b9384e690ed0c568de?s=96&d=mm&r=g\",\"caption\":\"NSFOCUS\"},\"sameAs\":[\"https:\\\/\\\/nsfocusglobal.com\"],\"url\":\"https:\\\/\\\/nsfocusglobal.com\\\/pt-br\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057) - NSFOCUS","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/","og_locale":"pt_BR","og_type":"article","og_title":"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057) - NSFOCUS","og_description":"On August 22, 2018, Beijing time, Apache Software Foundation (ASF) released a security bulletin, announcing a remote code execution vulnerability","og_url":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/","og_site_name":"NSFOCUS","article_published_time":"2018-08-27T21:16:24+00:00","article_modified_time":"2025-07-09T07:11:14+00:00","og_image":[{"url":"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Screen-Shot-2018-08-27-at-14.22.12.png","type":"","width":"","height":""}],"author":"NSFOCUS","twitter_card":"summary_large_image","twitter_title":"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057) - NSFOCUS","twitter_description":"On August 22, 2018, Beijing time, Apache Software Foundation (ASF) released a security bulletin, announcing a remote code execution vulnerability","twitter_image":"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Screen-Shot-2018-08-27-at-14.22.12.png","twitter_misc":{"Escrito por":"NSFOCUS","Est. tempo de leitura":"13 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/#article","isPartOf":{"@id":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/"},"author":{"name":"NSFOCUS","@id":"https:\/\/nsfocusglobal.com\/#\/schema\/person\/fd9ab61c9c77a81bbd870f725cc0c61d"},"headline":"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057)","datePublished":"2018-08-27T21:16:24+00:00","dateModified":"2025-07-09T07:11:14+00:00","mainEntityOfPage":{"@id":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/"},"wordCount":2613,"commentCount":0,"publisher":{"@id":"https:\/\/nsfocusglobal.com\/#organization"},"image":{"@id":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/#primaryimage"},"thumbnailUrl":"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Screen-Shot-2018-08-27-at-14.22.12.png","articleSection":["Blog","Emergency Response"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/","url":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/","name":"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057) - NSFOCUS","isPartOf":{"@id":"https:\/\/nsfocusglobal.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/#primaryimage"},"image":{"@id":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/#primaryimage"},"thumbnailUrl":"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Screen-Shot-2018-08-27-at-14.22.12.png","datePublished":"2018-08-27T21:16:24+00:00","dateModified":"2025-07-09T07:11:14+00:00","breadcrumb":{"@id":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/#primaryimage","url":"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Screen-Shot-2018-08-27-at-14.22.12.png","contentUrl":"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2018\/08\/Screen-Shot-2018-08-27-at-14.22.12.png","width":598,"height":322,"caption":"Struts logo on a blue background."},{"@type":"BreadcrumbList","@id":"https:\/\/nsfocusglobal.com\/technical-analysis-and-solution-apache-struts-2-remote-code-execution-vulnerability-s2-057\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nsfocusglobal.com\/"},{"@type":"ListItem","position":2,"name":"Technical Analysis and Solution | Apache Struts 2 Remote Code Execution Vulnerability (S2-057)"}]},{"@type":"WebSite","@id":"https:\/\/nsfocusglobal.com\/#website","url":"https:\/\/nsfocusglobal.com\/","name":"NSFOCUS","description":"Security Made Smart and Simple","publisher":{"@id":"https:\/\/nsfocusglobal.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nsfocusglobal.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/nsfocusglobal.com\/#organization","name":"NSFOCUS","url":"https:\/\/nsfocusglobal.com\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/nsfocusglobal.com\/#\/schema\/logo\/image\/","url":"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2024\/08\/logo-ns.png","contentUrl":"https:\/\/nsfocusglobal.com\/wp-content\/uploads\/2024\/08\/logo-ns.png","width":248,"height":36,"caption":"NSFOCUS"},"image":{"@id":"https:\/\/nsfocusglobal.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/nsfocusglobal.com\/#\/schema\/person\/fd9ab61c9c77a81bbd870f725cc0c61d","name":"NSFOCUS","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/d3dc987908fc59791d261b1006d84eb931d15287261476b9384e690ed0c568de?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d3dc987908fc59791d261b1006d84eb931d15287261476b9384e690ed0c568de?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d3dc987908fc59791d261b1006d84eb931d15287261476b9384e690ed0c568de?s=96&d=mm&r=g","caption":"NSFOCUS"},"sameAs":["https:\/\/nsfocusglobal.com"],"url":"https:\/\/nsfocusglobal.com\/pt-br\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/posts\/7658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/comments?post=7658"}],"version-history":[{"count":1,"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/posts\/7658\/revisions"}],"predecessor-version":[{"id":32629,"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/posts\/7658\/revisions\/32629"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/media\/1577"}],"wp:attachment":[{"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/media?parent=7658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/categories?post=7658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsfocusglobal.com\/pt-br\/wp-json\/wp\/v2\/tags?post=7658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}