CVE-2022-22954: RCE via Freemarker SSTI in VMware Workspace ONE Access and Identity Manager
An unauthenticated server-side template injection in VMware Workspace ONE Access and Identity Manager allowed an attacker to execute arbitrary shell commands as the horizon user. A second local privilege escalation flaw then allowed the attacker to gain root.
attackerkb.com
Published on attackerkb.com
On April 6, 2022, VMware published VMSA-2022-0011, which discloses multiple vulnerabilities discovered by Steven Seeley (mrme) of Qihoo 360 Vulnerability Research Institute. The most critical of the CVEs published in VMSA-2022-0011 is CVE-2022-22954, which is a server-side template injection issue with a CVSSv3 base…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, user input was passed unsanitised into a Freemarker template that was then evaluated, allowing arbitrary code execution.
Impact
An unauthenticated attacker could execute arbitrary commands as the horizon user and then escalate to root, leading to full compromise of the host.
What the attacker needed
Network access to the web interface; no authentication required
How it was found
- Send a crafted request to the /catalog-portal/ui/oauth/verify endpoint with a malicious deviceUdid parameter containing a Freemarker Execute payload.
- The payload runs a shell command as the horizon user.
- To escalate privileges, overwrite a writable script that horizon can run with sudo.
- Run the overwritten script with sudo to execute commands as root.
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 write-up has not been written yet. The Original tab links to the source.
Server-side template injection happens when user input is inserted into a template and the template engine evaluates it as code. Here, a parameter was passed to a Freemarker template that allowed the attacker to run system commands. The attacker could then run commands as the web service user and, with a second flaw, become the root administrator.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.