ProxyToken: An Authentication Bypass in Microsoft Exchange Server
An authentication bypass in Microsoft Exchange Server allowed an unauthenticated attacker to perform configuration actions on arbitrary mailboxes, such as forwarding all emails to an attacker-controlled account. The flaw arose because the front-end proxy delegated authentication to the back end when a SecurityToken cookie was present, but the back-end module responsible for validating that cookie was not loaded by default.
Published on zerodayinitiative.com
Continuing with the theme of serious vulnerabilities that have recently come to light in Microsoft Exchange Server, in this article we present a new vulnerability we call ProxyToken. It was reported to the Zero Day Initiative in March 2021 by researcher Le Xuan Tuyen of VNPT ISC, and it was patched by Microsoft in the…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The front-end proxy delegated authentication to the back end when a SecurityToken cookie was present, but the back-end module that validates that cookie was not loaded by default, so neither side authenticated the request.
What the attacker needed
Network access to the Exchange server; ability to send HTTP requests to /ecp
The fix
The vulnerability was fixed by Microsoft in the July 2021 Exchange cumulative updates.
How it was found
- Send a request to an /ecp page without a canary to receive an HTTP 500 error that includes a valid ECP canary.
- Include the obtained canary and a non-empty SecurityToken cookie in a request to an /ecp endpoint.
- The front end delegates authentication to the back end because of the SecurityToken cookie, but the back end does not load the validation module, so the request is processed without authentication.
- Use the unauthenticated access to perform configuration actions on a target mailbox, such as installing a forwarding rule.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a bug in Microsoft Exchange, the email server software many companies use. Normally, when you try to change settings on someone's mailbox, the server checks who you are. Here, a special cookie made the front-end server skip its own check and hand the request to the back-end server, which also skipped the check because a security module was turned off by default. As a result, an attacker could change mailbox settings without logging in.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.