Zimbra popular webmail solution claims to have more than 200,000 business customers, including over 1,000 government and financial institutions and roughly 500 service providers.

Zimbra released patches for multiple security issues in the webmail solution, The flaws could allow an unauthenticated attacker to compromise the webmail server of an organization and gain access to all employee email messages.

Tracked as CVE-2021-35208, the first of the vulnerabilities is a DOM-based stored cross-site scripting (XSS) bug that an attacker could trigger when the victim views an incoming email.

An attacker looking to exploit the issue has to include crafted JavaScript code in the email. When executed, the payload would provide the attacker with access to the victim’s emails and to their webmail session.

The second bug is CVE-2021-35209, an open redirect leading to server-side request forgery (SSRF). An attacker could chain the two vulnerabilities to extract tokens and credentials from instances within the cloud infrastructure.

Zimbra’s three mail clients “may transform the trusted HTML of an email afterwards to display it in their unique way,” which could lead to corruption of the HTML, opening the door to XSS attacks.

The SSRF issue, on the other hand, was identified in the Webex integration that Zimbra supports, where a proxy forwards all HTTP request headers and parameters to URLs that match the *.webex.com pattern.

SSRF attacks like the one described above can be mitigated by disallowing the HTTP request handler to follow redirects. It makes sense to validate the value of the Location header of the response and create a new request after it has been validated. This would also protect against Open Redirect vulnerabilities

Both vulnerabilities were patched in late June with the release of Zimbra 9.0.0 P16 and 8.8.15 P23.