Lantronix PremierWave 2050 Web Manager SslGenerateCSR OS command injection vulnerability
The Web Manager's SslGenerateCSR feature builds an OS command from unsanitised HTTP POST parameters and runs it as root. An authenticated attacker can inject shell metacharacters into several fields to execute arbitrary commands.
Originally disclosed on Cisco Talos
An OS command injection vulnerability exists in the Web Manager SslGenerateCSR functionality of Lantronix PremierWave 2050 8.9.0.0R4. A specially-crafted HTTP request can lead to arbitrary command execution.
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The application concatenates user-supplied POST parameters directly into a shell command string without sanitisation, then executes it via a system call.
Impact
An authenticated attacker with ssl authorisation can execute arbitrary commands as root, leading to full compromise of the device.
What the attacker needed
Authenticated access to Web Manager; ssl group authorisation
How it was found
- Authenticate to the Web Manager.
- Send a POST request to the root path with ajax=SslGenerateCSR and the required certificate fields.
- Include shell metacharacters in one of the fields (for example, the state field) to inject a command.
- The injected command runs 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 report has not been written yet. The Original tab links to the source.
The device's web interface lets logged-in users create a certificate request. To do this, it runs a command-line program (openssl) using text the user typed. Because the text is not cleaned, a user can add extra shell commands that the device runs with full administrator rights.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.