CVE-2022-22948: Sensitive Information Disclosure in VMware vCenter
A file containing plaintext credentials for the vCenter Postgres database was readable by any user in the 'cis' group, allowing an attacker to access the database and retrieve an encrypted password for the high-privileged 'vpxuser' account. By reverse-engineering the encryption and using a separate privilege escalation flaw to obtain the decryption key, an attacker could decrypt the password and gain full control of the ESXi host.
Published on pentera.io
Pentera Labs’ Senior Security Researcher, Yuval Lazar, discovered an Information Disclosure vulnerability impacting more than 500,000 appliances running default vCenter Server deployments.
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 vcdb.properties file, which contains plaintext database credentials, was readable by the 'cis' group, and the vpxuser password was encrypted with a key stored in a file accessible only to root, requiring a separate privilege escalation to decrypt.
Impact
An attacker could gain full control of the ESXi host, including the ability to extract virtual machine memory, list inventory, and access sensitive files, but the attack requires chaining with a separate privilege escalation vulnerability (CVE-2021-22015) to obtain the decryption key.
What the attacker needed
Shell access as a user in the 'cis' group; ability to exploit CVE-2021-22015 for root
The fix
Apply the updates listed in VMware's advisory; there is no known workaround.
How it was found
- Gain shell access to vCenter as a low-privileged user in the 'cis' group.
- Read the vcdb.properties file to obtain plaintext Postgres database credentials.
- Connect to the Postgres database and query the vpx_host table to retrieve the encrypted vpxuser password.
- Reverse-engineer the vpxd process to identify the encryption algorithm (AES_256_CBC), the IV (first 16 bytes of the password phrase), and the key location (/etc/vmware-vpx/ssl/symkey.dat).
- Use CVE-2021-22015 to escalate privileges and read the symkey.dat file.
- Decrypt the vpxuser password and use it to SSH into the ESXi host with high privileges.
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.
A file on the vCenter server stored the database password in plain text, and any user in a certain group could read it. That let an attacker log into the database and find an encrypted password for a powerful account. By also using another bug to get higher privileges, the attacker could decrypt that password and take over the ESXi server.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.