What the Vuln: Zimbra
Zimbra Collaboration Suite Network Edition versions 8.8.15 Patch 30 and below and 9.0.0 Patch 23 and below are vulnerable to a path traversal flaw when extracting ZIP archives, allowing an attacker to write files to arbitrary locations. This could be leveraged to achieve remote code execution on the target system.
Published on bishopfox.com
What the Vuln is a new series where in each episode our offensive security experts and hackers deep dive and zero-in on one specific vulnerability that plagues organizations – from origins and technical components to how pen testers can find and exploit the vulnerability. The first episode of our series will explore…
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 ZIP extraction routine does not sanitise file paths within the archive, allowing directory traversal via '../' sequences in file names.
Impact
An unauthenticated attacker could write arbitrary files to the server and achieve remote code execution, potentially leading to full system compromise.
What the attacker needed
Zimbra Network Edition vulnerable version; Network access to the Zimbra web interface; A valid username (e.g., default admin)
The fix
The vulnerability was fixed in later patches; users should upgrade to a non-vulnerable version.
How it was found
- Identify the Zimbra version by accessing publicly available JavaScript files and looking for the CLIENT_VERSION setting.
- Confirm the server is the Network Edition by checking for the Touch option in the login page's version dropdown.
- Obtain a valid username, such as the default admin account.
- Create a ZIP file containing a JSP file with a path traversal filename that writes to a public web directory.
- Send the ZIP file via a POST request to the mboximport endpoint with the username parameter.
- Access the uploaded JSP file to execute commands and obtain a reverse shell.
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 a bug in Zimbra, an email and collaboration server. When the server receives a ZIP file, it unpacks it without checking that the file names inside stay within the intended folder. An attacker can craft a ZIP with file names that climb out of that folder (using '../' sequences) and place a malicious file in a web-accessible directory. Because the server then runs that file, the attacker can execute commands on the server.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.