KM03645637 - Cloud Optimizer. Apache Tomcat vulnerability, CVE-2020-1938.

  • KM03645637
  • 28-May-2020
  • 28-May-2020

Summary

There is a Security Vulnerability relating to Apache JServ Protocol (AJP), in Apache Tomcat has published by Apache Tomcat Security Bulletin. The vulnerability could be exploited to file content disclosure of the web application or remote code execution. 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. In Apache Tomcat 9.0.0.M1 to 9.0.0.30, 8.5.0 to 8.5.50 and 7.0.0 to 7.0.99, Tomcat shipped with an AJP Connector enabled by default that listened on all configured IP addresses. This vulnerability report identified a mechanism that allowed: - returning arbitrary files from anywhere in the web application - 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. In order to mitigate this vulnerability, Cloud Optimizer has given the steps for all impacted versions listed below. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1938

Reference

 

SUPPORT COMMUNICATION - SECURITY BULLETIN

Potential Security Impact: File content disclosure / remote code execution in Apache Tomcat

 

VULNERABILITY SUMMARY

 

There is a Security Vulnerability relating to Apache JServ Protocol (AJP),  in Apache Tomcat has published by Apache Tomcat Security Bulletin. The vulnerability could be exploited to file content disclosure of the web application or remote code execution.

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. In Apache Tomcat 9.0.0.M1 to 9.0.0.30, 8.5.0 to 8.5.50 and 7.0.0 to 7.0.99, Tomcat shipped with an AJP Connector enabled by default that listened on all configured IP addresses. This vulnerability report identified a mechanism that allowed: - returning arbitrary files from anywhere in the web application - 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. In order to mitigate this vulnerability, Cloud Optimizer has given the steps for all impacted versions listed below.

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1938

CVE References:

CVE-2020-1938

SUPPORTED SOFTWARE VERSIONS*: ONLY impacted versions are listed.

Cloud Optimizer:

Classic Versions: 3.02, 3.03, 3.04;                                                                     

Container Versions:   HCM suite where Copt Container 2018.08, 2019.11 are bundled

CVSS Version 3.0 and Version 2.0 Base Metrics

Reference

V3 Vector

V3 Base Score

V2 Vector

V2 Base Score

CVE-2020-1938

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

9.8

 (AV:N/AC:L/Au:N/C:P/I:P/A:P)

7.5

 

RESOLUTION

Though AJP is not used in Cloud Optimizer, We strongly recommend that AJP configuration in Tomcat be disabled for Cloud Optimizer.  Not disabling will render the product vulnerable.

 

Micro Focus has made the following mitigation information available to resolve the vulnerability for the impacted versions of Cloud Optimizer:

·         Steps for disabling AJP protocol on Cloud Optimizer Classic Linux &Virtual Appliance installations:

 

o   Stop the OvTomcat on the machine by running the below command:

/opt/OV/bin/ovc -stop ovtomcatB

o   Disable AJP protocol by running the below command:

/opt/OV/bin/ovconfchg  -ns NONOV.TomcatB  -set EnableAJP False

o   Start the OvTomcat by running the below command:

/opt/OV/bin/ovc -start ovtomcatB

 

·         Steps for disabling AJP protocol on Cloud Optimizer Container Installation:

 

o   Login to the Cloud Optimizer Container by using the below steps:

  • Please check the namespace and Cloud Optimizer POD by running kubectl commands as below :                                                      

              kubectl get pods --all-namespaces -o wide | grep –i optimizer              

  • Login to container with Namespace and POD name from the above command output:                    

              kubectl exec -it hcm-co-optimizer-5b695fb868-qwmgm -n hcm1 -c hcm-co-optimizer bash

 

o   Change the user to itom

su - itom

o   Disable AJP protocol by running the below command:

/opt/OV/bin/ovconfchg  -ns NONOV.TomcatB  -set EnableAJP False

 

o   Exit the shell with itom user and root user to come to Kubernetes Master Node

  • itom@hcm-co-optimizer-667d48fd9b-jmlps:~> exit
  • hcm-co-optimizer-667d48fd9b-jmlps:/ # exit
  • root@:/

 

o   Delete and recreate the POD

  •  If the NFS is local to Master node, Please follow the below steps:

                              cd /var/vols/itom/core/suite-install/hcm/output/

                              kubectl delete -f hcm-co-optimizer.yaml

                              kubectl create -f hcm-co-optimizer.yaml

                                                                       

  •  If the NFS is on a separate node, Please follow the below steps:               

                            

1. To get the yaml path, run below command to get the mount point of the suite-install on a master node                              

                mount |grep suite-install|grep cdf-apiserver

 co.test.com:/var/vols/itom/core/suite-install on /opt/kubernetes/data/kubelet/pods/81956647-e5e9-11e9-a421-005056845116/volume-subpaths/itom-vol/cdf-apiserver/3 type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=1.1.1.1,local_lock=none,addr=1.

2. Change the directory to the local path, delete and recreate the POD                          

              cd /opt/kubernetes/data/kubelet/pods/81956647-e5e9-11e9-a421-005056845116/volume-subpaths/itom-vol/cdf-apiserver/3/hcm/output                                                      

 kubectl delete -f hcm-co-optimizer.yaml                                                        

 kubectl create -f hcm-co-optimizer.yaml                                                              

3. After 3-4 minutes, Verify if the COpt POD is running with 2/2 state by running below command:

                                kubectl get pod --all-namespaces | grep –i optimizer

 

 

 

Third Party Security Patches: Third party security patches that are to be installed on systems running Micro Focus software products should be applied in accordance with the customer's patch management policy.

Support: For issues about implementing the recommendations of this Security Bulletin, contact normal Micro Focus services support channel. For other issues about the content of this Security Bulletin, send e-mail to Product Security Team.

Report: To report a potential security vulnerability for any supported product:

·         Web Form: https://mysupport.microfocus.com/psrt

·         Email: security@microfocus.com

 

Subscribe: To initiate receiving subscriptions for future Micro Focus Security Bulletin alerts via Email, please subscribe here - https://mysupport.microfocus.com/group/softwaresupport/email-notification/-/subscriptions/registerdocumentnotification 
Once you are logged in to the portal, please choose security bulletins under “product” and “document types”. 
Please note that you will need to sign in using a Passport account. If you do not have a Passport account yet, you can create one- it’s free and easy 
https://www.microfocus.com/selfreg/jsp/createAccount.jsp

Security Bulletin Archive: A list of recently released Security Bulletins is available here: https://mysupport.microfocus.com/security-vulnerability

Software Product Category: The Software Product Category is represented in the title by the two characters following Micro Focus Security Bulletin.

3P = 3rd Party Software 
GN = Micro Focus General Software 
MU = Multi-Platform Software 


System management and security procedures must be reviewed frequently to maintain system integrity. Micro Focus is continually reviewing and enhancing the security features of software products to provide customers with current secure solutions. 

"Micro Focus is broadly distributing this Security Bulletin in order to bring to the attention of users of the affected Micro Focus products the important security information contained in this Bulletin. Micro Focus recommends that all users determine the applicability of this information to their individual situations and take appropriate action. Micro Focus does not warrant that this information is necessarily accurate or complete for all user situations and, consequently, Micro Focus will not be responsible for any damages resulting from user's use or disregard of the information provided in this Security Bulletin. To the extent permitted by law, Micro Focus disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose, title and non-infringement." 

© Copyright Micro Focus 

Micro Focus shall not be liable for technical or editorial errors or omissions contained herein. The information provided is provided "as is" without warranty of any kind. To the extent permitted by law, neither Micro Focus nor its affiliates, subcontractors or suppliers will be liable for incidental, special or consequential damages including downtime cost; lost profits; damages relating to the procurement of substitute products or services; or damages for loss of data, or software restoration. The information in this document is subject to change without notice. Micro Focus and the names of Micro Focus products referenced herein are trademarks of Micro Focus in the United States and other countries. Other product and company names mentioned herein may be trademarks of their respective owners.