GHSL-2020-137: Unsafe deserialization in Lumisoft Mail Server
Lumisoft Mail Server deserialises untrusted XML into a DataSet in an unauthenticated command, and its client libraries deserialise data returned by servers. An attacker could achieve pre-auth remote code execution on the server, or on a client in a man-in-the-middle or malicious-server scenario.
Lumisoft MailServer is extensively using deserialization of user supplied data into a DataSet object.
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 calls DataSet.ReadXml on user-supplied or server-supplied XML, which Microsoft warns is unsafe with untrusted input.
Impact
This may lead to pre-auth remote code execution; if the endpoint is only reachable locally and the server runs privileged, it may instead lead to local privilege escalation. The client-side issue may lead to pre-auth RCE in a man-in-the-middle scenario or if the user connects to a malicious server.
What the attacker needed
Network access to port 5252 (localhost by default); no authentication needed; for client issue: MITM or malicious server
How it was found
- Connect to the server on port 5252, which by default only allows localhost.
- Send an unauthenticated UPDATESETTINGS command with a virtual server ID, a data length, and XML data.
- The server reads the XML into a DataSet, triggering unsafe deserialisation.
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.
Deserialisation means turning data (here XML) back into program objects. If that data comes from an untrusted source, an attacker can craft it so the program does something dangerous, such as running their code. Here the mail server accepted such data without a login, and its client software also trusted data from servers.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.