QID 730457

Date Published: 2022-04-26

QID 730457: WSO2 Unrestricted Arbitrary File Upload and Remote Code Execution (RCE) Vulnerability (WSO2-2021-1738) (Intrusive Check)

Due to improper validation of user input, a malicious actor could upload an arbitrary file to a user controlled location of the server. By leveraging the arbitrary file upload vulnerability, it is further possible to gain remote code execution on the server.

AFFECTED PRODUCTS:
WSO2 API Manager 2.2.0 and above
WSO2 Identity Server 5.2.0 and above
WSO2 Identity Server Analytics 5.4.0, 5.4.1, 5.5.0, 5.6.0
WSO2 Identity Server as Key Manager 5.3.0 and above
WSO2 Enterprise Integrator 6.2.0 and above
WSO2 Open Banking AM 1.4.0 and above
WSO2 Open Banking KM 1.4.0 and above

QID Detection Logic (Unauthenticated):
This is an intrusive check that checks for vulnerable WSO2 Server by creating a JSP file on a vulnerable server. This is achieved by sending a POST request containing the payload in the request body to the vulnerable endpoint (fileupload/toolsAny). The payload will create a file called qualystest.jsp containing the following static text: File Generated By QID 730457. You can check the file at the following endpoints:
authenticationendpoint/qualystest.jsp
publisher/qualystest.jsp

By leveraging the vulnerability, a malicious actor may perform Remote Code Execution by uploading a specially crafted payload.

  • CVSS V3 rated as Critical - 9.8 severity.
  • CVSS V2 rated as Critical - 10 severity.
  • Solution
    Vendor has released patch, for more information please refer to WSO2-2021-1738
    Vendor References

    CVEs related to QID 730457

    Software Advisories
    Advisory ID Software Component Link
    WSO2-2021-1738 URL Logo docs.wso2.com/pages/viewpage.action?pageId=180952746