Zimbra Collaboration Suite cpio Attachment Path Traversal to Unauthenticated RCE (CVE-2022-41352)
Published: 2026-11-27 • Researcher: Cr4ckC4t (repository author); reported by the Zimbra security team and analysed by Rapid7 and AttackerKB contributors
Exploitation signals
Confirmed exploited in the wild. Added to CISA KEV 2022-10-20. Federal remediation deadline 2022-11-10.
EPSS 75.9% · 100th percentile
- Severity
- Critical
- CVE
- CVE-2022-41352
- Category
- web
- Affected product
- Zimbra Collaboration Suite (ZCS), through the amavis content filter and cpio attachment extraction
- Affected versions
- NVD lists 8.8.15 and 9.0. Vendor and repository guidance: 9.0 before 9.0.0.p27 and 8.8.15 before 8.8.15.p34. Systems without pax installed, where amavis falls back to cpio, are exposed.
- Disclosed
- 2026-11-27
- Patch status
- Patched
Tags
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-41352
- https://github.com/Cr4ckC4t/cve-2022-41352-zimbra-rce
- https://wiki.zimbra.com/wiki/Zimbra_Security_Advisories
- https://wiki.zimbra.com/wiki/Security_Center
- http://packetstormsecurity.com/files/169458/Zimbra-Collaboration-Suite-TAR-Path-Traversal.html
- https://attackerkb.com/topics/1DDTvUNFzH/cve-2022-41352/rapid7-analysis
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-41352
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-27 |
| Last Updated | 2022-11-24 |
| Author / Researcher | Cr4ckC4t (repository author); reported by the Zimbra security team and analysed by Rapid7 and AttackerKB contributors |
| CVE / Advisory | CVE-2022-41352 |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.8 (CVSSv3.1, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, NVD) |
| Status | Weaponized (delivers a JSP webshell end to end and can create a global administrator) |
| Tags | zimbra, synacor, amavis, cpio, tar, path-traversal, arbitrary-file-write, jsp-webshell, unauthenticated, cwe-22, kev |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Zimbra Collaboration Suite (ZCS), through the amavis content filter and cpio attachment extraction |
| Versions Affected | NVD lists 8.8.15 and 9.0. Vendor and repository guidance: 9.0 before 9.0.0.p27 and 8.8.15 before 8.8.15.p34. Systems without pax installed, where amavis falls back to cpio, are exposed. |
| Language / Platform | Java web application (JSP) and Perl amavis filter on Linux; Python 3 attacker script using smtplib and requests |
| Authentication Required | No (any inbound mail sender; the recipient address need not exist) |
| Network Access Required | Yes (SMTP port 25 to the mail server, plus HTTPS to the web client port for verification) |
Summary
CVE-2022-41352 is an arbitrary file write in Zimbra Collaboration Suite caused by the way the amavis content filter extracts tar attachments with cpio. A crafted archive carries a link entry that resolves to a directory outside the extraction root and a second entry that writes through that link, so an unauthenticated sender can place files anywhere the amavis process can write, including the public web application directory. The bundled exploit builds that two-block ustar archive around a JSP command shell, sends it as an email attachment over SMTP, verifies the uploaded shell and can then create a new global Zimbra administrator. Zimbra shipped fixes in 9.0.0.p27 and 8.8.15.p34 and recommends installing pax so amavis stops using cpio, and the flaw is in the CISA Known Exploited Vulnerabilities catalog.
Vulnerability Details
Root Cause
amavis scanned incoming mail and unpacked archive attachments with cpio when the preferred pax utility was not installed, which is the default state on Red Hat derived systems after RHEL 6. The cpio extraction did not confine link targets to the extraction directory, so an archive entry could create a symbolic link pointing at an arbitrary absolute directory and a following regular file entry could then be written through that link. This is the CWE-22 path traversal that NVD describes as an arbitrary file upload through amavis with extraction under the Zimbra web application tree. The bundled script reproduces the primitive exactly: the first ustar block is a type 2 link named startup whose target is /opt/zimbra/jetty_base/webapps/zimbra/public/jsp, and the second block is the JSP payload at startup/Startup1_3.jsp.
Attack Vector
An unauthenticated SMTP transaction to TCP port 25 carrying a multipart email whose attachment is named payload.tar and whose body is the crafted archive. The recipient does not have to exist, because the archive is parsed by amavis when the message is processed rather than when it is delivered. No authentication, session or prior interaction is needed. The same archive can be deployed manually if the operator can deliver the email directly to the server.
Impact
Arbitrary file write as the zimbra user, chained to remote code execution by writing a JSP webshell into the public web directory and requesting it over HTTPS. Successful exploitation yields command execution on the mail server and, with the fullpwn mode of the script, creation of a new global administrator account through zmprov. A compromised Zimbra server exposes all mailboxes, address books, calendars, authentication material and any services that trust the mail host.
Environment / Lab Setup
OS: Ubuntu 20.04 LTS target with Zimbra installed; any Linux attacker host
Target: Zimbra Collaboration 9.0.0.p26 or 8.8.15.p33 without pax installed,
so amavis falls back to cpio
Attacker: Python 3.8+ with requests, plus an SMTP-reachable network path to port 25
Tools: python3, requests, smtplib (standard library)Setup Steps
The upstream README gives no build instructions beyond editing the configuration block or passing flags. In an isolated lab, install Zimbra at a vulnerable patch level on a host that does not provide pax, confirm that amavis uses cpio, and reach TCP 25 and the HTTPS client port from the attacker host. Then install the Python dependency:
| |
The script defaults are TARGET mail.test.org, WEBSHELL_PATH /public/jsp, WEBSHELL_NAME Startup1_3.jsp, ATTACHMENT payload.tar, SENDER test@test.org, RECIPIENT admin@test.org and UPLOAD_BASE /opt/zimbra/jetty_base/webapps/zimbra.
Proof of Concept
Step-by-Step Reproduction
- Build the archive — run the script in manual mode to write payload.tar locally without contacting a target. The first block is a symlink named startup pointing at the absolute public web directory, the second is the JSP webshell.Shell script
1python3 cve-2022-41352.py manual - Deliver it by email — run auto mode against the lab server so the script submits the archive as a MIME attachment over SMTP port 25. The recipient address need not exist.Shell script
1python3 cve-2022-41352.py auto --target 10.0.0.10 - Verify the write — the script waits five seconds and requests the webshell path over HTTPS, reporting PWNED on HTTP 200.Shell script
1curl -k "https://10.0.0.10/public/jsp/Startup1_3.jsp?task=id" - Optionally create an administrator — fullpwn mode uses the deployed shell to run zmprov ca and zmprov ma through the task parameter.
Exploit Code
See
cve-2022-41352.pyin this folder. The upstream README isupstream-README.md.
| |
Expected Output
| |
The webshell renders a form and echoes the captured stdout of the task parameter inside pre tags, so requesting it with task=id returns the zimbra account identity. A patched server or one where pax takes precedence over cpio never writes the file, the verification request does not return 200 and the script exits with the upload unsuccessful message.
Detection & Indicators of Compromise
/opt/zimbra/jetty_base/webapps/zimbra/public/jsp/Startup1_3.jspSearch the web application tree for recently created JSP, WAR or other executable content and compare against the package manifest. Alert on TAR attachments in transit from external senders where the archive contains a type 2 link entry, and on mail addressed to non-existent local recipients that is still processed by amavis.
SIEM / IDS Rule (example):
alert http any any -> any any (msg:"CVE-2022-41352 Zimbra JSP webshell request"; flow:to_server,established; http.uri; content:"/public/jsp/"; nocase; content:"task="; nocase; sid:90413520;)Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade to Zimbra 9.0.0.p27 or 8.8.15.p34, or later, per the Zimbra security advisories. |
| Workaround | Install pax on the Zimbra host and restart the services so amavis prefers pax over cpio, and block TAR and other archive attachments at the mail gateway where operationally possible. |
| Config Hardening | Remove execute or write permissions for the web application public directory where not required, monitor the Zimbra web tree for new executable content, and audit administrator accounts after any suspected exploitation. |
References
Notes
Auto-prepared on 2026-11-27 from the public repository Cr4ckC4t/cve-2022-41352-zimbra-rce. Review verdict: genuine exploit that implements the vulnerable primitive rather than detecting it. The script constructs the two-block ustar archive, delivers it over SMTP, verifies the webshell over HTTPS and can create a global administrator, so it was ingested. Limitations: it only works where amavis resolves to cpio and the default installation paths are used, the default configuration uses placeholder addresses and a fixed JSP shell name that is easy to signature, the verification step sleeps a fixed five seconds and treats only HTTP 200 as success, the administrator creation path uses a fixed password, and the script disables TLS verification for its requests. The upstream repository declares no license file, so the code is archived with attribution for research use only and all other rights remain with the author. The most recent upstream commit is dated 2022-11-24.
| |