-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                               ESB-2020.0667
                       Apache Tomcat Vulnerabilities
                             25 February 2020

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:           Tomcat
Publisher:         Apache
Operating System:  Windows
                   UNIX variants (UNIX, Linux, OSX)
Impact/Access:     Provide Misleading Information -- Remote/Unauthenticated
                   Access Confidential Data       -- Remote/Unauthenticated
                   Unauthorised Access            -- Remote/Unauthenticated
Resolution:        Patch/Upgrade
CVE Names:         CVE-2020-1938 CVE-2020-1935 CVE-2019-17569

Original Bulletin: 
   https://www.mail-archive.com/users@tomcat.apache.org/msg134240.html
   https://www.mail-archive.com/users@tomcat.apache.org/msg134239.html
   https://www.mail-archive.com/users@tomcat.apache.org/msg134241.html

Comment: This bulletin contains three (3) Apache security advisories.

- --------------------------BEGIN INCLUDED TEXT--------------------

CVE-2020-1938 AJP Request Injection and potential Remote Code Execution

Severity: High

Vendor: The Apache Software Foundation

Versions Affected:
Apache Tomcat 9.0.0.M1 to 9.0.30
Apache Tomcat 8.5.0 to 8.5.50
Apache Tomcat 7.0.0 to 7.0.99

Description:
When using the Apache JServ Protocol (AJP), care must be taken when
trusting incoming connections to Apache Tomcat. Tomcat treats AJP
connections as having higher trust than, for example, a similar HTTP
connection. If such connections are available to an attacker, they can
be exploited in ways that may be surprising.

Prior to Tomcat 9.0.31, 8.5.51 and 7.0.100, Tomcat shipped with an AJP
Connector enabled by default that listened on all configured IP
addresses. It was expected (and recommended in the security guide) that
this Connector would be disabled if not required.

Prior to this vulnerability report, the known risks of an attacker being
able to access the AJP port directly were:
- - bypassing security checks based on client IP address
- - bypassing user authentication if Tomcat was configured to trust
  authentication data provided by the reverse proxy
This vulnerability report identified a mechanism that allowed the following:
- - returning arbitrary files from anywhere in the web application
  including under the WEB-INF and META-INF directories or any other
  location reachable via ServletContext.getResourceAsStream()
- - processing any file in the web application as a JSP
Further, if the web application allowed file upload and stored those
files within the web application (or the attacker was able to control
the content of the web application by some other means) then this, along
with the ability to process a file as a JSP, made remote code execution
possible.

Mitigation:
It is important to note that mitigation is only required if an AJP port
is accessible to untrusted users.
- - If AJP support is not required, the Connector may be disabled e.g. by
  removing the AJP Connector element from the server.xml file
- - If AJP support is required, untrusted users may be prevented from
  accessing the AJP port by one or more of the following means:
  - configuring appropriate network firewall rules
  - configuring an explicit address attribute to the connector so that
    the Connector listens on a non-public interface
  - configuring a shared secret for the AJP connection
Users wishing to take a defence-in-depth approach and block the vector
that permits returning arbitrary files and execution as JSP may upgrade to:
- - Apache Tomcat 9.0.31 or later
- - Apache Tomcat 8.5.51 or later
- - Apache Tomcat 7.0.100 or later
Users should note that a number of changes were made to the default AJP
Connector configuration in these versions to harden the default
configuration. The changes are:
- - The AJP Connector is commented out in the provided server.xml file.
- - The "requiredSecret" attribute has been renamed "secret" (the old name
  continues to work but is deprecated).
- - A new attribute "secretRequired" has been added which defaults to
  "true". When this attribute is "true", the AJP Connector will not
  start unless a shared secret has been configured.
- - The default listen address for the AJP Connector is now the loopback
  address.
It is likely that users upgrading to 9.0.31, 8.5.51 or 7.0.100 and later
will need to make small changes to their configurations as a result.


References:
[1] http://tomcat.apache.org/security-9.html
[2] http://tomcat.apache.org/security-8.html
[3] http://tomcat.apache.org/security-7.html


- --------------------------------------------------------------------------------


CVE-2020-1935 HTTP Request Smuggling

Severity: Low

Vendor: The Apache Software Foundation

Versions Affected:
Apache Tomcat 9.0.0.M1 to 9.0.30
Apache Tomcat 8.5.0 to 8.5.50
Apache Tomcat 7.0.0 to 7.0.99

Description:
The HTTP header parsing code used an approach to end-of-line parsing
that allowed some invalid HTTP headers to be parsed as valid. This led
to a possibility of HTTP Request Smuggling if Tomcat was located behind
a reverse proxy that incorrectly handled the invalid Transfer-Encoding
header in a particular manner. Such a reverse proxy is considered unlikely.

Mitigation:
- - Upgrade to Apache Tomcat 9.0.31 or later
- - Upgrade to Apache Tomcat 8.5.51 or later
- - Upgrade to Apache Tomcat 7.0.100 or later

Credit:
This issue was found by @ZeddYu and reported responsibly to the Apache
Tomcat Security Team.

References:
[1] http://tomcat.apache.org/security-9.html
[2] http://tomcat.apache.org/security-8.html
[3] http://tomcat.apache.org/security-7.html


- --------------------------------------------------------------------------------


CVE-2019-17569 HTTP Request Smuggling

Severity: Low

Vendor: The Apache Software Foundation

Versions Affected:
Apache Tomcat 9.0.28 to 9.0.30
Apache Tomcat 8.5.48 to 8.5.50
Apache Tomcat 7.0.98 to 7.0.99

Description:
The refactoring in 9.0.28, 8.5.48 and 7.0.98 introduced a regression.
The result of the regression was that invalid Transfer-Encoding headers
were incorrectly processed leading to a possibility of HTTP Request
Smuggling if Tomcat was located behind a reverse proxy that incorrectly
handled the invalid Transfer-Encoding header in a particular manner.
Such a reverse proxy is considered unlikely.

Mitigation:
- - Upgrade to Apache Tomcat 9.0.31 or later
- - Upgrade to Apache Tomcat 8.5.51 or later
- - Upgrade to Apache Tomcat 7.0.100 or later

Credit:
This issue was found by @ZeddYu and reported responsibly to the Apache
Tomcat Security Team.

References:
[1] http://tomcat.apache.org/security-9.html
[2] http://tomcat.apache.org/security-8.html
[3] http://tomcat.apache.org/security-7.html

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        https://www.auscert.org.au/bulletins/

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQIVAwUBXlTD6maOgq3Tt24GAQil/hAAyfdkthTH4xSP/PKJurPoPoJHZVLZ0eJM
0r3fkms9NDcLO9w2mPlCHhwPaCJOq04ym7JD+STjcFrift6jDaFi+L0cqkYGtT2r
5/010STqJl+F6rqXJxH+dA2dLiGqTHq1FCR1OdNnNJ7TlfCy7txjc/Bqx3fQgk2r
iIdGjC4VnUJnjfkTo7ybMQfdMbs4TgiZJpaGIT68x8Na6uL2HT1TTgxUK0hoaHy5
gm5YF1QX4T4I7NwJyVkPw2+Qq07sPE/12c7uc9uCIr/hB/rTOb7MFr/X5oY/cDem
Zwxra0dyGMWk8pB37BJMplFyfCYLYb6bpLv3Lr1g63wj2cDLgs60Fr/ekl3A0cHW
LYpL+u81md2UrVmxl9osZCjPWokVEF3Dq146Szi/nKwdMA12Um+0vE569Dn78FlG
d3ooXUzPPyFjzn/niBu6+Bp9pohjLgJbjgiPOMf+Rprr9JRNZTxSSZd1A1WM0wNY
Lgd0ptpoJ3FV0s9eOjHnffyoL9N3yxH4VAHSCSTYsMfKTDy2juXfvxGJxsSCTZGU
v2uO6Y6Jxfc1gdMe7JWUJQVlPiSmGYFNmC1Oyu7JmBJBqp6riVy7V8wdYSyuH+lr
QsW0HTb5/w6j6KMU9Ssv/aRSTgHFM06bve2bYRGyp84fxWzH/5t6hA8Xfc4MQQvm
Td1o2pp7Xxw=
=yYUg
-----END PGP SIGNATURE-----