{
    "file_item": {
        "filepath": "security-advisories",
        "filename": "CERT-EU-SA2022-063.pdf"
    },
    "title": "Path Traversal Vulnerability in Unrar affects Zimbra software",
    "serial_number": "2022-063",
    "publish_date": "31-08-2022 12:55:00",
    "description": "In May 2022, security research team from SonarSource discovered a 0-day vulnerability in the \"unrar\" utility for Linux and Unix systems. This utility is a third party tool used in Zimbra. The exploitation of this vulnerability allows a remote attacker to execute arbitrary code on a vulnerable Zimbra instance without requiring any prior authentication or knowledge about it.<br><br>Proof of Concepts (POC) are now publicly available as well as a metasploit module.",
    "url_title": "2022-063",
    "content_markdown": "---\ntitle: 'Path Traversal Vulnerability in Unrar affects Zimbra software'\nversion: '1.0'\nnumber: '2022-063'\noriginal_date: 'June 28, 2022'\ndate: 'August 31, 2022'\n---\n\n_History:_\n\n* _31/08/2022 --- v1.0 -- Initial publication_\n\n# Summary\n\nIn May 2022, security research team from SonarSource discovered a 0-day vulnerability in the `unrar` utility for Linux and Unix systems. This utility is a third party tool used in Zimbra. The exploitation of this vulnerability allows a remote attacker to execute arbitrary code on a vulnerable Zimbra instance without requiring any prior authentication or knowledge about it. [1]\n\n**Proof of Concepts (POC) are now publicly available as well as a metasploit module.**\n\n# Details\n\nThe vulnerability is identified as **`CVE-2022-30333`** and has a severity score of 7.5 out of 10. [2]\n\nThe main issue here is with how unrar handles symbolic links. Specifically, it validates that Linux symbolic links don't contain path traversal characters using forward-slash characters `(../)`, then converts Windows symbolic links (with backslash characters) to Linux. That is, it performs security checks before converting data. As a result, a malicious Windows symbolic link can bypass Linux's protections and point to anywhere on the Linux filesystem [4]\n\nRegarding Zimbra software, it uses a tool called Amavis, an open-source content filter to provide protection against spam and viruses and other malware. Amavis uses `unrar` utility to inspect .rar files.\n\nOnce the vulnerability is exploited on Zimbra instance, the attacker can execute arbitrary system commands as the `zimbra` user.\n\n# Affected Products\n\nThe official security patch by RarLab is contained in the UnRar source code version `6.1.7` and is included with the binaries of version `6.12`. Any previous version may be vulnerable,  which is used by:\n\n* Zimbra 9.0.0 patch 24 and earlier\n* Zimbra 8.8.15 patch 31 and earlier\n* Possibly older versions\n\n# Recommendations\n\nAs of the most recent Zimbra patches, Amavis uses 7z instead. CERT-EU strongly recommends applying the latest updates of Zimbra as soon as possible on. [5]\n\n# References\n\n[1] <https://blog.sonarsource.com/zimbra-pre-auth-rce-via-unrar-0day/>\n\n[2] <https://nvd.nist.gov/vuln/detail/CVE-2022-30333>\n\n[3] <https://wiki.zimbra.com/wiki/Zimbra_Releases/8.8.15/P32>\n\n[4] <https://attackerkb.com/topics/RCa4EIZdbZ/cve-2022-30333/rapid7-analysis?referrer=blog>\n\n[5] <https://wiki.zimbra.com/wiki/Zimbra_Releases>",
    "content_html": "<p><em>History:</em></p><ul><li><em>31/08/2022 --- v1.0 -- Initial publication</em></li></ul><h2 id=\"summary\">Summary</h2><p>In May 2022, security research team from SonarSource discovered a 0-day vulnerability in the <code>unrar</code> utility for Linux and Unix systems. This utility is a third party tool used in Zimbra. The exploitation of this vulnerability allows a remote attacker to execute arbitrary code on a vulnerable Zimbra instance without requiring any prior authentication or knowledge about it. [1]</p><p><strong>Proof of Concepts (POC) are now publicly available as well as a metasploit module.</strong></p><h2 id=\"details\">Details</h2><p>The vulnerability is identified as <strong><code>CVE-2022-30333</code></strong> and has a severity score of 7.5 out of 10. [2]</p><p>The main issue here is with how unrar handles symbolic links. Specifically, it validates that Linux symbolic links don't contain path traversal characters using forward-slash characters <code>(../)</code>, then converts Windows symbolic links (with backslash characters) to Linux. That is, it performs security checks before converting data. As a result, a malicious Windows symbolic link can bypass Linux's protections and point to anywhere on the Linux filesystem [4]</p><p>Regarding Zimbra software, it uses a tool called Amavis, an open-source content filter to provide protection against spam and viruses and other malware. Amavis uses <code>unrar</code> utility to inspect .rar files.</p><p>Once the vulnerability is exploited on Zimbra instance, the attacker can execute arbitrary system commands as the <code>zimbra</code> user.</p><h2 id=\"affected-products\">Affected Products</h2><p>The official security patch by RarLab is contained in the UnRar source code version <code>6.1.7</code> and is included with the binaries of version <code>6.12</code>. Any previous version may be vulnerable, which is used by:</p><ul><li>Zimbra 9.0.0 patch 24 and earlier</li><li>Zimbra 8.8.15 patch 31 and earlier</li><li>Possibly older versions</li></ul><h2 id=\"recommendations\">Recommendations</h2><p>As of the most recent Zimbra patches, Amavis uses 7z instead. CERT-EU strongly recommends applying the latest updates of Zimbra as soon as possible on. [5]</p><h2 id=\"references\">References</h2><p>[1] <a rel=\"noopener\" target=\"_blank\" href=\"https://blog.sonarsource.com/zimbra-pre-auth-rce-via-unrar-0day/\">https://blog.sonarsource.com/zimbra-pre-auth-rce-via-unrar-0day/</a></p><p>[2] <a rel=\"noopener\" target=\"_blank\" href=\"https://nvd.nist.gov/vuln/detail/CVE-2022-30333\">https://nvd.nist.gov/vuln/detail/CVE-2022-30333</a></p><p>[3] <a rel=\"noopener\" target=\"_blank\" href=\"https://wiki.zimbra.com/wiki/Zimbra_Releases/8.8.15/P32\">https://wiki.zimbra.com/wiki/Zimbra_Releases/8.8.15/P32</a></p><p>[4] <a rel=\"noopener\" target=\"_blank\" href=\"https://attackerkb.com/topics/RCa4EIZdbZ/cve-2022-30333/rapid7-analysis?referrer=blog\">https://attackerkb.com/topics/RCa4EIZdbZ/cve-2022-30333/rapid7-analysis?referrer=blog</a></p><p>[5] <a rel=\"noopener\" target=\"_blank\" href=\"https://wiki.zimbra.com/wiki/Zimbra_Releases\">https://wiki.zimbra.com/wiki/Zimbra_Releases</a></p>",
    "licence": {
        "title": "Creative Commons Attribution 4.0 International (CC-BY 4.0)",
        "link": "https://creativecommons.org/licenses/by/4.0/",
        "restrictions": "https://cert.europa.eu/legal-notice",
        "author": "The Cybersecurity Service for the Union institutions, bodies, offices and agencies"
    }
}