CVE-2022-31660 and CVE-2022-31661 (FIXED): VMware Workspace ONE Access, Identity Manager, and vRealize Automation LPE
Two local privilege escalation flaws in VMware Workspace ONE Access allow the low-privileged horizon user to become root: one via a writable script invoked by a sudo-allowed service restart, the other via a sudo-allowed log export script that changes ownership of a user-supplied directory. An attacker with code execution as horizon could chain these to gain root.
Published on rapid7.com
CVE-2022-31660 and CVE-2022-31661 (FIXED): VMware Workspace ONE Access, Identity Manager, and vRealize Automation LPE
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, the horizon user can write to a script that is later executed with root privileges, and a sudo-allowed script changes ownership of a user-controlled directory, granting write access to other sudo-allowed scripts.
Impact
These local privilege escalation flaws present little risk by themselves, but when chained with a remote code execution vulnerability like CVE-2022-22954, a remote attacker could gain root access.
What the attacker needed
Access as the horizon user; ability to run sudo commands without a password
How it was found
- As the horizon user, overwrite the cert-proxy.sh script with malicious content.
- Run the certproxyService.sh restart script via sudo without a password.
- The service restart executes the overwritten script as root, giving a root shell.
- For the second flaw, run the getProtectedLogFiles.hzn script with the exportProtectedLogs subcommand on a target directory.
- The script changes ownership of that directory to horizon, granting write access to scripts that can be run with sudo.
- Overwrite one of those scripts and invoke it via sudo to gain 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.
These bugs let a low-privileged user on a server become the all-powerful root user. The server runs a web application as a user called horizon, and that user can run certain maintenance scripts with root rights without a password. By abusing those scripts, the horizon user can take over the whole system.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.