Discovery
An unauthenticated file upload endpoint in Aruba ClearPass passed a user-controlled passphrase to a shell script that invoked OpenSSL without quoting, allowing argument injection. By uploading a malicious OpenSSL engine file and using a wildcard to reference the randomly named temporary file, an attacker could execute arbitrary code as root.
dozer.nz
Published on dozer.nz
I discovered an unauthenticated RCE vulnerability in Aruba ClearPass Policy Manager that I reported to Aruba, and it is now fixed. The Aruba security bulletin is available at ARUBA-PSA-2020-005.txt.
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
The passphrase parameter was passed unquoted to a shell script that invoked OpenSSL, allowing argument injection; combined with an unvalidated file upload, an attacker could supply an OpenSSL engine file and use a wildcard to reference it.
Impact
An unauthenticated attacker could execute arbitrary code as root on the ClearPass server.
What the attacker needed
Network access to the ClearPass management interface; ability to send HTTP requests to the endpoint
The fix
The vulnerability was fixed in version 6.9.1; the best mitigation is to keep ClearPass up to date and restrict network access to the management interface.
How it was found
- Send a GET request to the tipsSimulationUpload.action endpoint to confirm it returns a 200 response.
- Craft a multipart POST request to the same endpoint with a clientPassphrase parameter and an uploaded file.
- Set the clientPassphrase to an argument injection string that includes the -engine option and a wildcard path to the temporary file.
- Upload a compiled OpenSSL engine file as the certificate file.
- The server writes the uploaded file to a temporary file and runs the shell script, which executes OpenSSL with the injected arguments, loading the engine and running its code.
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.
The application let anyone upload a file and then ran a command-line tool (OpenSSL) using a password the attacker supplied. Because the password was not properly quoted, an attacker could sneak extra instructions into the command. By also uploading a special file that OpenSSL would load as a plugin, the attacker could make the server run their own code.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.