Zimbra's hidden loginAs grant survives a password reset: find it with one zmprov search
Rapid7 showed how a script running in a Zimbra webmail session can quietly give another account the right to open the victim's mailbox. The grant does not show in the Classic delegates screen, and a password reset does not remove it. This page shows the one search an admin can run today.
Read the original first: https://www.rapid7.com/blog/post/ve-calendar-forgery-and-stored-xss-in-zimbra-part-2/
In one minute
- Zimbra has a right called loginAs. It lets one account open another user's mailbox with its own password.
- Rapid7 found that a script running in the victim's webmail (through a stored XSS bug) can grant loginAs to an attacker's own local account.
- Zimbra 10.1.20 blocked this on the main request (CVE-2026-50054). An older request, GrantPermissionRequest, still accepted it (CVE-2026-137843, rated 8.1). Rapid7 lists no fix for that one.
- The grant is stored on the server. A password change or ending sessions does not remove it, and it does not appear in Classic's Delegates view.
- Zimbra 10.1.22 came out on December 2 but fixes only NGINX issues, not these.
- Admins can list every loginAs grant with one zmprov search, then remove any that were not set on purpose.
How the backdoor gets planted
Step one is a stored XSS bug: a booby-trapped message or calendar item that runs a script when the victim views it in Zimbra's web client. Rapid7's Part 2 covers four of these, each rated 9.3.
The script reads the victim's session token and sends a GrantPermissionRequest. It asks the server to give the loginAs right on the victim's mailbox to an account the attacker controls.
The attacker then signs in to their own account and points it at the victim's mailbox. The server hands over the victim's mail.
Why a password reset does not help
The grant is saved on the server, in an attribute named zimbraACE. It is not tied to the victim's password or session.
So changing the password or kicking out sessions leaves it in place. Rapid7 also says the grant is hidden from the Classic web client's Delegates screen. Admin rights queries can see it.
Limits: the attacker needs a local account on the same server to receive the grant, and needs the script to run in the victim's session first.
Find bad grants
Rapid7 gives this search. Run it on the mailbox server as the zimbra Unix user. It lists every account that has a loginAs grant.
/opt/zimbra/bin/zmprov -l sa '(zimbraACE=*loginAs)'
For each account it lists, look at the grants in detail. Rapid7 gives this pattern; put the account name in place of the brackets.
zmprov -l ga [account] zimbraACE
- Each grant names the grantee by an ID. Look up who it is and compare it with the delegations you approved.
- Remove any grant nobody set on purpose. Upgrading Zimbra does not remove old grants.
- If a mailbox looks touched, also check its mail filter and forwarding rules. Rapid7 says expiring sessions or resetting passwords is not enough.
Who is affected
| Case | Status |
|---|---|
| CVE-2026-50054 (loginAs through GrantRights) | Fixed in 10.1.20. |
| CVE-2026-137843 (loginAs through legacy GrantPermission) | No public fix listed. |
| CVE-2026-93647, -93641, -93642 (stored XSS, 9.3) | Fixed in 10.1.21. |
| CVE-2026-93648 (stored XSS in Classic Group Calendar Scheduler, 9.3) | No public fix listed. |
| CVE-2026-93627, -93628, -93629 (calendar forgery, 5.3) | No public fix listed. |
| Zimbra 10.1.22 (December 2) | Fixes NGINX issues only, not the flaws above. |
What to do
- Upgrade to at least 10.1.21.
- Run the zmprov search for loginAs grants on every mailbox server.
- Remove grants that were not set on purpose, and check filters and forwarding on those mailboxes.
- Watch Zimbra's security advisories for fixes to the open flaws.
What is still unknown
- When Zimbra will fix the legacy GrantPermission path.
- Whether anyone has used this chain in real attacks. Rapid7's post does not report any.
- How many Zimbra servers are exposed.
Sources
- Rapid7: Calendar Forgery and Stored XSS in Zimbra (Part 2) (Dec. 2, 2026) - the original report
- The Hacker News: New Unpatched Zimbra Flaw Lets Hackers Keep Mailbox Access Even After Password Resets
- Rapid7: Breaking Zimbra Identity Boundaries (Part 1)
- Zimbra Security Advisories