Automated Threat Modeling

Brief Summary: Zimbra Collaboration Suite CVE-2026-137836, Unauthenticated Stored XSS in the XML Sanitizer (with PoC)

A brief summary of CVE-2026-137836, an unauthenticated stored XSS in Zimbra Collaboration Suite's XML sanitizer. Includes the public PoC details and researcher-provided detection guidance.

CVE Analysis

9 min read

Gaurav Sarraf
Gaurav Sarraf

2026-12-03

Brief Summary: Zimbra Collaboration Suite CVE-2026-137836, Unauthenticated Stored XSS in the XML Sanitizer (with PoC)

Introduction

An unauthenticated sender can deliver an ordinary-looking XML attachment to a Zimbra mailbox. The moment a signed-in recipient opens it inline, attacker-controlled JavaScript runs in the authenticated Zimbra origin. For organizations running Zimbra Collaboration Suite, that means mailbox data access and authenticated SOAP actions reachable from nothing more than normal mail delivery plus a single click.

CVE-2026-137836 was reported by Rapid7 researcher Jonah Burgess and carries a CVSS 3.1 score of 9.3 Critical. It survives a prior fix: the 10.1.20 attribute-encoding correction for CVE-2026-33370 closed one path but left a parallel text-node sink open.

Technical Information

The root cause lives in a decoding step inside Zimbra's SAX-based XML sanitizer. When Zimbra processes an XML attachment, the SAX parser decodes character references in text nodes before XHtmlDocumentHandler.characters() buffers the resulting text. Because decoding happens first, the buffer can now contain literal markup delimiters (<, >) and quotation characters rather than the harmless encoded text that was present on the wire.

The sanitizer then flushes that buffer straight to output without re-applying XML escaping. The write-up documents that startElement() emits the raw buffer (this.out.append(this.textBuffer)), and endElement() contains the same raw flush. Only attribute values are escaped. That asymmetry is the whole bug: attribute encoding was corrected for CVE-2026-33370 in 10.1.20, but the text path was left intact.

The content-type routing makes it worse. In the analyzed 10.1.20 implementation:

  • application/xml is considered scriptable (SCRIPTABLE_CONTENT_TYPES) and is routed through XHtmlDefang by DefangFactory.
  • But application/xml is absent from the XML media types forced to download as application/octet-stream (DEFANG_XML_CONTENT_TYPES), so it is not forced to download.
  • For inline delivery, NativeFormatter sanitizes and returns the content while retaining the XML response type.

Because the sanitizer emitted decoded text as markup, the browser receives active SVG in the authenticated Zimbra origin.

Attack flow

  1. The attacker crafts valid XML whose text node contains an entity-encoded SVG element, using an SVG load event to execute JavaScript.
  2. The attacker delivers it as a base64-encoded MIME part with Content-Type: application/xml and Content-Disposition: inline, over unauthenticated SMTP. No Zimbra authentication is required to send.
  3. A signed-in recipient opens the attachment through Zimbra's inline REST view.
  4. The SAX parser decodes the entities, the handler flushes the decoded markup unescaped, and NativeFormatter returns it with the XML response type.
  5. The browser parses the response as active SVG markup, and the onload handler runs JavaScript on the Zimbra origin, enabling mailbox content access and SOAP operations available to the recipient.

The same text-node sink is also reachable through XML or XHTML content uploaded to Briefcase, but that route requires an ordinary attacker account and a document readable by the victim. Persistence beyond the browser session is not an intrinsic property of this XSS; it requires a separate delegation flaw to be present as well.

NVD lists CWE-79 (improper neutralization of input during web page generation) and CWE-1116 (inaccurate comments). The available technical writeup does not separately explain the rationale for the inaccurate comments classification.

Proof of Concept

A working public PoC exists, published in the jburgess-r7/zimbra-vulnerability-tracker repository, which NVD references. The repository contains both a detailed write-up (vulnerabilities/CVE-2026-137836.md) and a functional Python exploit script (pocs/CVE-2026-137836/xhtml_text_content_xss.py).

The payload is valid XML whose text node contains an entity-encoded SVG element:

<p>&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; onload=&quot;alert(document.domain)&quot;&gt;&lt;rect width=&quot;1&quot; height=&quot;1&quot;/&gt;&lt;/svg&gt;</p>

It is delivered as a base64-encoded MIME part with Content-Type: application/xml and Content-Disposition: inline; filename="report.xml".

The Python PoC builds the malicious XML via build_xml() (HTML-escaping an SVG onload payload, defaulting to alert(document.domain)), wraps it in a MIMEBase("application", "xml") inline attachment, and sends it over unauthenticated SMTP using smtplib. Key invocation:

python3 pocs/CVE-2026-137836/xhtml_text_content_xss.py \ --smtp-host mail.lab.local \ --victim [email protected] \ --sender [email protected]

It accepts --smtp-host, --smtp-port (default 25), --victim, --sender, --javascript (default alert(document.domain)), --filename (default report.xml), and --subject. On success it prints:

[+] SMTP accepted XML attachment 'report.xml' for [email protected] [*] trigger: open the attachment through Zimbra's inline REST view

A signed-in recipient opening the attachment via its inline REST URL (/service/home/~/?id=MSG_ID&part=2) causes Zimbra to serve the decoded markup, confirmed by the documented response:

HTTP/1.1 200 OK Content-Type: application/xml;charset=utf-8 <?xml version='1.0' encoding='UTF-8'?> <p><svg xmlns="http://www.w3.org/2000/svg" onload="alert(document.domain)"><rect width="1" height="1"/></svg></p>

The onload handler executes JavaScript on the authenticated Zimbra origin. This verdict is based on the published code and the researcher's documented demonstration rather than independent execution. Rapid7 lists no confirmed fixed release through ZCS 10.1.22.

Detection Methods

There are no published Snort, Suricata, YARA or Sigma signatures for CVE-2026-137836. The researcher has published a triage tool and evidence-handling guidance in the public Zimbra vulnerability tracker, which NVD links from the CVE record. The tool is meant for hunting and investigation, not mail blocking.

Why simple content matching fails

The bug sits in a decoding step. The payload never contains a literal <svg tag on the wire; it is entity-encoded text inside an ordinary XML element, and it is usually base64-encoded inside the MIME part as well. The researcher's example payload is a <p> element whose text is &lt;svg ... onload=&quot;...&quot;&gt;, sent with these MIME headers:

Content-Type: application/xml MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="report.xml"

A grep for <svg or onload= across raw mail spool files will miss this. To see what the sanitizer will emit, a detector has to MIME-decode the part and then XML-parse it so entities are resolved, which is what Zimbra does.

Researcher-provided inspector: inspect_message.py

The tracker's detections/inspect_message.py takes saved RFC 5322 .eml files and prints one JSON object per message, including the message's SHA-256, Message-ID, From, To, Subject and a list of indicators. Run it like this:

python3 detections/inspect_message.py evidence/message.eml

The tool treats a MIME part as XML if its content type ends in /xml or +xml, or its filename ends in .xml, .xhtml, .svg, .xsl or .xslt. It parses the part's original bytes with Python's ElementTree, which honours the encoding declaration and decodes entities much as Zimbra's SAX parser does. It then checks every element's text, tail and attribute values against this markup pattern:

MARKUP = re.compile(r"<\s*/?\s*[A-Za-z][^>]*>|[\"']\s+on[a-z]+\s*=|\bjavascript\s*:", re.I)

The relevant indicators for this CVE are:

  • decoded_xml_markup (tagged CVE-2026-137836 and ZIMBRA-SVGXSS): element text or attributes contain active-looking markup once entities are decoded. This is the main signal for this bug.
  • xml_dtd_not_inspected (tagged CVE-2026-137836, CVE-2026-137837 and ZIMBRA-SVGXSS): the document has a DOCTYPE. The inspector stops without expanding the DTD or its entities, so the payload could be hidden in an entity definition; these need separate manual review.
  • xml_stylesheet_instruction (tagged for the related CVE-2026-137837): the attachment has an xml-stylesheet processing instruction, worth a look but legitimate in some documents.

The tool does not execute HTML, JavaScript, XSLT or remote resources. It caps input size (--max-mib, default 50), so it is safe to run over suspicious evidence in bulk.

Confirming on the server side what the browser received

An inspector hit shows that a message was weaponized. It does not show that the script ran. To confirm the exposure, preserve the original attachment and the response Zimbra served for it, including the response content type. In the researcher's reproduction, the inline REST view of the attachment (/service/home/~/?id=MSG_ID&part=2) came back as application/xml;charset=utf-8, and the body contained a literal <svg ...> element with an onload attribute where the original attachment only had escaped text. That before-and-after difference is the clearest evidence of exploitation. Proxy or web logs showing a recipient requesting the inline view of a flagged message's XML part show that the attachment was opened.

The same text-node sink can also be reached through XML/XHTML documents shared from Briefcase, so shared Briefcase documents should go through the same review, not just inbound mail.

Hunting for what happens after execution

If execution is suspected, review the recipient's subsequent SOAP activity and their stored account state. The script runs with the victim's session, so a payload can add a mailbox-access grant, a forwarding rule or a linked account, and then delete the message that delivered it. A clean inbox does not rule out compromise; persistent changes like these are often the only lasting evidence.

Exposure checks and limits

  • Version-based exposure: NVD lists ZCS 10.1.0 through 10.1.21 as affected. The tracker says no fixed release has been established through 10.1.22. The 10.1.20 change that escapes attribute values (CVE-2026-33370) does not close this text-node path, so a host on 10.1.20 or later should not be treated as unaffected.
  • False positives: legitimate XML can contain escaped markup in text nodes, for example documentation or embedded HTML snippets. An indicator means content to investigate, and ordinary XML attachments should not be blocked just because they appear in a report.
  • Preserve evidence first: keep the full original .eml, including MIME parts and delivery headers, before any cleanup. A screenshot of the rendered message loses the encoded values that separate this attack from benign content.

Affected Systems and Versions

NVD lists Zimbra Collaboration Suite (ZCS) versions 10.1.0 through 10.1.21 as affected. The researcher's CVE-specific tracker states that no fixed release has been established through ZCS 10.1.22. The 10.1.20 attribute-encoding correction associated with CVE-2026-33370 does not close this text-node path, so hosts on 10.1.20 or later should not be treated as unaffected. The vendor's December 2 release notes for ZCS 10.1.22 describe NGINX proxy security fixes and do not establish a correction for this XML sanitizer flaw.

Vendor Security History

Zimbra has faced repeated exploitation of distinct vulnerabilities. CISA and MS-ISAC's 2022 advisory documented active exploitation involving CVE-2022-24682, CVE-2022-27924, CVE-2022-27925 chained with CVE-2022-37042, and CVE-2022-30333. More recently, the July 2026 joint advisory describes Russian state-supported LAUNDRY BEAR activity exploiting CVE-2025-66376, which was patched in November 2025. That shows Zimbra email data remains an operational target, but it does not attribute attacks against CVE-2026-137836. For the present vulnerability, the research record highlights an incomplete protection boundary: attribute escaping did not remove the parallel text output sink.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization