Lantronix PremierWave 2050 Web Manager SslGenerateCSR stack-based buffer overflow vulnerability
The SslGenerateCSR handler in the PremierWave 2050 web manager concatenates several user-supplied CSR fields into a fixed-size stack buffer without checking length. An authenticated attacker with the ssl permission could overflow that buffer, corrupt the stack frame and gain control of the program counter, potentially leading to remote code execution.
Originally disclosed on Cisco Talos
A stack-based buffer overflow vulnerability exists in the Web Manager SslGenerateCSR functionality of Lantronix PremierWave 2050 8.9.0.0R4 (in QEMU). A specially crafted HTTP request can lead to remote code 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 handler copies user-controlled CSR fields into a fixed 1048-byte stack buffer using strcat without any length validation.
What the attacker needed
Authenticated access; ssl permission on the account; network access to the web manager
How it was found
- Send an authenticated HTTP POST request to the device's web manager.
- Include the ajax=SslGenerateCSR directive along with the certificate request fields.
- Supply an excessively long value in one or more of the s, l, o, ou or cn parameters.
- Observe the crash with the program counter overwritten by attacker-controlled bytes.
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 page builds a text command by gluing together pieces of text the user types in, such as the state and city for a certificate request. It puts the result into a fixed-size space on the stack, which is a small area of memory the program uses for temporary data. Because it never checks how long the typed text is, a very long value spills over into neighbouring memory and can redirect the program to run attacker-chosen code.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.