<?xml version="1.0" encoding="UTF-8"?>
<document>

  <properties>
    <author>Apache Tomcat Project</author>
    <title>Security Model</title>
  </properties>

<body>
  <section name="Security model for Apache Tomcat">

    <subsection name="Introduction">

      <p>The Apache Tomcat<sup>&#174;</sup> Security Team reviews reported
         vulnerabilities against the following security model:</p>

    </subsection>

    <subsection name="Administrative users">

      <p>Administrative users are always considered to be trusted. Reports for
         vulnerabilities where an attacker already has access to or control over
         any of the following will be rejected:</p>

      <ul>
        <li>Tomcat binaries and/or scripts.</li>
        <li>Tomcat configuration files.</li>
        <li>Tomcat log files.</li>
        <li>The temp directory (by default <code>$CATALINA_BASE/temp</code>)</li>
        <li>Web application working directories (by default
            <code>$CATALINA_BASE/work</code>)</li>
        <li>The persisted session store.</li>
        <li>The Manager or Host Manager web applications provided with Tomcat.</li>
        <li>The JMX API (local or remote).</li>
        <li>The Java Attach API or any other debugging interface.</li>
      </ul>

      <p>Reports for vulnerabilities where an attacker tricks an administrative
         user into performing an action the administrator did not intend to
         perform (e.g. CSRF vulnerabilities) will be accepted.</p>

    </subsection>

    <subsection name="Web applications">

      <p>Web applications deployed to Tomcat are considered to be trusted.
         Vulnerabilities in user-provided web applications are application
         vulnerabilities, not Tomcat vulnerabilities.</p>

      <p>Web applications that enable functionality that allows the modification
         of the web application (e.g. WebDAV, HTTP PUT requests or similar) are
         expected to take steps to secure that functionality. Failure to do so
         is an application vulnerability, not a Tomcat vulnerability.</p>

      <p>Reports of vulnerabilities in the web applications included with
         standard Tomcat distributions from the ASF will be accepted. Reporters
         should review the comments about each of the provided applications in
         the <strong><i>Security Considerations</i></strong> section of the
         documentation for the version under test.</p>

    </subsection>

    <subsection name="Connectors">

      <p>Data received via a Connector, regardless of protocol, is considered to
         be untrusted with the exception of:</p>

      <ul>
        <li>The standard request attributes and any arbitrary request attributes
            permitted by <code>allowedRequestAttributesPattern</code> for an AJP
            connector.</li>
        <li>HTTP headers processed by a <code>RemoteIpValve</code>,
            <code>SSLValve</code>, equivalent filters
            (<code>RemoteIpFilter</code>) or any similar functionality.</li>
      </ul>

      <p>All clients (including reverse proxies) are responsible for the
         consequences of the data they present to Tomcat. If a client presents a
         (potentially malformed) request that Tomcat processes as per the
         specification for the configured protocol, then any security impact to
         the client is the client's responsibility.</p>

    </subsection>

    <subsection name="Clustering">

      <p>Cluster traffic requires a trusted network unless the
         <code>EncryptInterceptor</code> is used in which case confidentiality
         and integrity will be protected but not availability.</p>

      <p>Multicast cluster membership always requires a trusted network.</p>

    </subsection>

    <subsection name="Logging">

      <p>Security-sensitive information will not be logged with the default
         configuration apart from anything included in the request URI.</p>

      <p>Security-sensitive information may be logged with modified logging
         configurations, particularly if debug logging is enabled.</p>

      <p>The default logs are likely to contain personally identifiable
         information (PII) such as the IP address of users.</p>

      <p>Tomcat is not responsible for the content of log messages generated by
         applications.</p>

    </subsection>

  </section>

  <section name="Known non-findings">

    <p>The following non-findings are frequently reported to the Tomcat security
       team despite them being invalid as per the security model described
       above. Repeated reports of non-findings from any source will be treated
       as spam and will result in all email from the source being blocked at the
       ASF's border.</p>
    
    <ol>
      <li>Any report that depends on deserialisation within the clustering code
          (<code>org.apache.catalina.ha</code>
          <code>org.apache.catalina.tribes</code> and all sub-packages) when the
          EncryptInterceptor has not been configured.</li>

      <li>Any report that depends on an attacker controlling a node within a
          cluster.</li>

      <li>Any report that depends on modification of persisted session data
          where the mechanism to modify the persisted session data is not
          accessible to a non-administrative user.</li>

      <li>Any report that depends on write access to an application's 
          <code>docBase</code>.</li>

      <li>Any report that depends on attacker controlled SSI directives.</li>
    </ol>
  </section>

</body>
</document>
