Preparation
The vCenter Server's h5-vsan plugin exposed a REST endpoint without authentication, and its ProxygenController used unsafe reflection to invoke methods on Spring beans. An attacker could send a crafted request to trigger a JNDI injection and achieve remote code execution.
y4y.space
Published on y4y.space
The exploitation of this RCE consists of two parts, one being the lack of authentication validation to h5-vsan endpoint, and another being the unsafe reflection usage in Java which then caused a JNDI injection. I was not smart enough to come up with the JDNI attack chain, but certainly learned a lot while attempting…
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 missing authentication filter on the /rest/* endpoint combined with a controller that used user-supplied class and method names in reflection without proper validation.
Impact
An unauthenticated attacker could execute arbitrary code on the vCenter Server, potentially taking full control of the system.
What the attacker needed
VCenter Server with vsan healthcheck plugin; network access to the vCenter Server; attacker-controlled RMI server
The fix
The fix added an authentication filter to the /rest/* endpoint, as shown in the fixed web.xml.
How it was found
- Set up an ESXi server and vSphere client.
- Locate the vulnerable vsan-h5-client.zip package.
- Decompile the JAR files to inspect web.xml and ProxygenController.
- Identify the unauthenticated /ui/h5-vsan/rest/proxy/service/{beanIdOrClassName}/{methodName} endpoint.
- Send a POST request with a bean name prefixed with & to access the MethodInvokingFactoryBean class.
- Use the setTargetObject method to trigger a JNDI lookup to an attacker-controlled RMI server.
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.
This is about a flaw in VMware vCenter Server where a web service could be reached without logging in. That service allowed calling Java methods by name, and because the name could be controlled, an attacker could make the server fetch and run malicious code from another server. This is called remote code execution.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.