Automated Threat Modeling

Zimbra Attach Mail Zimlet Stored XSS (CVE-2026-137835): PoC and Detection Guidance

A summary of CVE-2026-137835, an unauthenticated stored XSS in the Zimbra Classic Attach Mail Zimlet, with a review of the public PoC and content-based detection guidance.

CVE Analysis

11 min read

Gaurav Sarraf
Gaurav Sarraf

2026-12-03

Zimbra Attach Mail Zimlet Stored XSS (CVE-2026-137835): PoC and Detection Guidance

Introduction

An attacker who can send one plain email to a Zimbra user can run JavaScript in that user's authenticated mailbox, and the victim never has to open the message. CVE-2026-137835 is a stored cross site scripting flaw in the bundled Attach Mail Zimlet of the Zimbra Collaboration Suite Classic Web Client. The trigger is a routine action: opening the Attach, Mail picker while composing a new message.

Zimbra Collaboration Suite (ZCS) is a self hosted platform for email, calendars, contacts, tasks, and file sharing, shipped in an open source edition and a commercial Network Edition. Contemporary reporting describes it as a widely deployed email and collaboration platform used by hundreds of millions of users, thousands of businesses, and hundreds of government agencies. Its Classic and Modern web clients share a mailbox server but have separate browser implementations, and this vulnerability lives specifically in the Classic Attach Mail path.

Technical Information

The affected component is com_zimbra_attachmail in the Classic Web Client. The entire payload is carried in the RFC 5322 From display name of a conventionally delivered email. That makes this a stored email metadata vulnerability rather than one that needs an attachment to execute or a message body to be opened.

The root cause is a broken trust boundary between XML attribute escaping on the server and HTML insertion in the browser. The technical analysis traces the defect across server serialization and client rendering:

  1. On the server, ToXML.encodeEmail() decodes and sanitizes the sender's personal part and exports it as the SOAP p attribute. XML attribute escaping protects transport syntax, but it does not encode for later HTML insertion.
  2. In the Classic client, the participant parser in ZmMailItem.js constructs an AjxEmailAddress. When there is no matching address book contact name, it falls back to the sender controlled node.p value.
  3. The Attach Mail dialog automatically selects Inbox and runs a message search. In attachmail.js, _showTreeView() drives this. The message row renderer HTML encodes the message fragment and subject, but inserts the decoded sender name into the HTML array without the same encoding.
  4. DwtListView.js assigns the assembled row to div.innerHTML via div.innerHTML = htmlArr.join(""). The browser therefore interprets the injected content as active HTML during initial list population. No further message row selection is needed.

The published CVSS vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N. This describes network delivery, low attack complexity, no attacker privileges, required user interaction, changed scope, and high confidentiality and integrity impact with no availability impact scored. The required interaction is opening the picker, not opening the malicious message.

Attack flow

The end to end exploitation sequence from the writeup is:

  1. The attacker crafts an email whose From display name contains an HTML payload with an event handler, and sends it over ordinary SMTP from a fresh attacker controlled address.
  2. Mail delivery preserves the crafted display name. A matching address book contact or a gateway rewrite could replace it, which would reduce exposure.
  3. The message lands in a folder searched by the picker, normally the Inbox, and stays there.
  4. The recipient, using Classic with the Attach Mail Zimlet enabled, opens New Message, Attach, Mail.
  5. The picker auto selects Inbox and renders its rows. The decoded sender name is inserted raw into the row HTML and executes during the initial render.

The documented direct consequences are mailbox reading, message sending, and mailbox state modification, all in the authenticated Classic application context of the recipient. Persistent access after the browser session ends is described as a conditional chain involving a separate delegation vulnerability, not an inherent capability of this XSS alone.

Proof of Concept

A working, CVE specific public PoC exists in Rapid7 researcher Jonah Burgess's jburgess-r7/zimbra-vulnerability-tracker repository. The standalone Python 3 SMTP script pocs/CVE-2026-137835/classic_attachmail_from_xss.py sends a conventional message whose quoted From display name carries the XSS payload:

python3 pocs/CVE-2026-137835/classic_attachmail_from_xss.py \ --target mail.lab.local \ --recipient [email protected] \ --sender [email protected] \ --javascript 'alert(document.domain)'

The script builds the malicious display name as an <img src=x onerror=...> tag, encoding the supplied JavaScript via eval(String.fromCharCode(...)) so it survives header handling:

def event_javascript(javascript: str) -> str: if not javascript: raise RuntimeError("--javascript must be nonempty") utf16 = javascript.encode("utf-16-le") values = ",".join( str(int.from_bytes(utf16[offset : offset + 2], "little")) for offset in range(0, len(utf16), 2) ) return f"eval(String.fromCharCode({values}))" def malicious_display_name(javascript: str) -> str: return f"<img src=x onerror={event_javascript(javascript)}>"

The message is then constructed with the payload embedded in the From header and delivered over plain SMTP:

message["From"] = f'"{display_name}" <{sender}>' ... with smtplib.SMTP(args.target, args.port, timeout=20) as smtp: smtp.ehlo("attacker.invalid") smtp.sendmail(sender, [recipient], message)

On success the script prints the generated subject and [*] trigger: Classic -> New Message -> Attach -> Mail. The repository writeup includes screenshots confirming alert(document.domain) execution when the Attach Mail picker renders the crafted Inbox row. The payload runs in the authenticated Classic application context, and the writeup notes it can be chained with a separate delegation flaw for persistent mailbox access. The prerequisites are that the recipient uses the Classic web client with the com_zimbra_attachmail Zimlet enabled, the crafted message remains in the searched folder, and normal delivery preserves the display name. The PoC was reviewed, not executed, but the code is complete and functional.

Detection Methods

No vendor signature, Sigma rule, YARA rule, or network IDS rule was found for CVE-2026-137835. The usable public detection guidance comes from Rapid7's Zimbra vulnerability tracker and works on two layers: finding the planted message, and finding out whether its script ran and what it changed.

Why the From header is the artifact

The whole payload is in the RFC 5322 From display name. ToXML.encodeEmail() decodes the display name and returns it as the SOAP p attribute, and the Attach Mail row renderer inserts that name into HTML without encoding it, even though it HTML encodes the subject and fragment beside it. The subject and body can therefore look harmless while the sender name holds the script. This has three triage consequences:

  • Searching raw mail for <script or onerror= is not reliable. A display name can be sent as an RFC 2047 encoded word, so it must be decoded before matching.
  • A screenshot of the sender is not enough evidence. Keep the original RFC 5322 message, including its MIME parts and delivery headers.
  • Sender domains and IPs are not useful indicators. The PoC uses a fresh attacker controlled sender address, and no stable malicious domain, IP, or file hash has been published. The useful indicator is the shape of the content.

Using the published message inspector

The tracker's detections/inspect_message.py parses saved .eml files and prints one JSON object per message, including the SHA-256 of the source file, the Message-ID, From, To, Subject, and a list of indicators. It never runs HTML, JavaScript, or remote resources, so it is safe to use on hostile evidence:

python3 detections/inspect_message.py evidence/message.eml

The script decodes every raw From header, splits the result into display name and address with getaddresses, and runs this pattern against each part:

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

The pattern matches HTML like tags, a quote followed by an on...= event handler attribute, and javascript: URIs. A hit produces the markup_in_from indicator, which names this CVE directly:

from_fields = [value for pair in getaddresses([raw_from]) for value in pair if value] if any(MARKUP.search(value) for value in from_fields) or (not from_fields and MARKUP.search(raw_from)): indicator("markup_in_from", ["CVE-2026-93647", "CVE-2026-66912", "CVE-2026-137835"], value=raw_from)

The scan accepts an input limit (--max-mib, 50 MiB by default) and several files at once. It does not offer a built in recursive or mailbox store scan, so a full sweep needs the messages exported as .eml files first. The JSON output can then be loaded into a SIEM.

Reading a hit correctly

The markup_in_from indicator is shared. It also covers CVE-2026-93647 (COUNTER XSS) and CVE-2026-66912 (reply divider XSS). A hit shows that the From field contains active looking markup, not which rendering path, if any, was used. To link a hit to this CVE, confirm that the recipient uses the Classic web client, the com_zimbra_attachmail Zimlet is enabled, and the message was still in the folder the picker searches. The claim that the user never opened the message does not clear the user, because the script runs when the user opens New Message, Attach, Mail and the picker lists the Inbox automatically. If the sender matches an address book contact or a gateway rewrites display names, the stored payload is less likely to have rendered. A hit is a lead, not a blocking verdict.

Looking for signs that the script ran

A successful payload runs as the signed in Classic user and can set up a mailbox access grant, a forwarding rule, or a linked account and then delete the delivering message, so a clean looking Inbox is not proof that nothing happened. If you suspect the script ran, inspect SOAP activity after the message arrived:

python3 detections/hunt_logs.py --kind soap evidence/mailbox.log

The SOAP hunt covers filter rule changes (ModifyFilterRulesRequest, ModifyOutgoingFilterRulesRequest), app password creation, listing and revocation, scratch code operations, and two factor disabling. A sample log line:

2026-12-01 15:11:51,220 INFO [qtp22600334-485:https://192.168.80.136/service/soap] [[email protected];mid=4;ip=192.168.80.136;port=57188;soapId=abdd4bb;] soap - ModifyFilterRulesRequest elapsed=6

The log line shows when a change was made but not the new rule contents, so read the saved Sieve scripts directly, since the Modern filter editor may hide a notify forwarding action. Run as the zimbra user:

/opt/zimbra/bin/zmprov -l ga [email protected] zimbraMailSieveScript zimbraMailOutgoingSieveScript

Review notify destinations and any use of ${body}. To find linked account persistence, collect the account's data sources before removing anything:

/opt/zimbra/bin/zmprov -l gds [email protected] > victim-datasources.txt

Look for unexpected OAuth contact or CalDAV sources, and handle the output as sensitive evidence since it may contain provider credentials or tokens. Persistent mailbox delegation is checked with the tracker's stored loginAs hunt against parsed zimbraACE values in LDAP, which finds a grant still in place however the SOAP request that created it was encoded.

What this approach cannot see

Normal proxy and access logs do not record the display name, and the rendering happens entirely in the browser, so the server records no event for payload executed. The reliable evidence is the original MIME message plus the account changes that followed it. Preserve both before deleting the message or undoing any changes.

Affected Systems and Versions

NVD lists ZCS 10.1.0 through 10.1.21 as affected. The researcher's specific technical advisory extends the affected range through 10.1.22 when the Attach Mail Zimlet is enabled, and states that no fixed release has been established through that version. So 10.1.22 must not be represented as a confirmed fix. The vulnerable configuration requires the Classic web client with the com_zimbra_attachmail Zimlet enabled, and a crafted message that remains in the folder searched by the picker, normally the Inbox. The root cause was analyzed in the ZCS 10.1.20 code.

Vendor Security History

Zimbra has a documented history of vulnerabilities receiving operational exploitation. A CISA and MS ISAC advisory described exploitation of multiple ZCS vulnerabilities in 2022 across government and private sector networks, including a chain affecting over 1,000 instances. More recently, CISA confirmed active exploitation of the separate CVE-2026-73570 and added it to KEV on August 21, 2026. Neither establishes exploitation of CVE-2026-137835. The vendor's November 2026 security discussion states that fixes were available before KEV listing for all 19 Zimbra vulnerabilities examined in its whitepaper, which is the vendor's characterization of its historical patch readiness rather than evidence of a fix for this new issue. Zimbra's advisory page documents multiple recent Classic and Modern XSS fixes, while the specific Attach Mail advisory still reports no confirmed correction through 10.1.22. The record is mixed: active remediation alongside continuing unresolved exposure.

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