Skip to content
RCE Advisory Advanced

(Pwn2Own) Microsoft Teams ElectronJS Frame Redirect Remote Code Execution Vulnerability

The top ElectronJS frame in Microsoft Teams Desktop could be navigated to a malicious page via JavaScript, giving access to internal application objects. An attacker who could already run JavaScript in an iframe could then execute arbitrary code in the context of the current process.

oskarsv Follow

Originally disclosed on Zero Day Initiative

High 7.2 View original

This vulnerability allows remote attackers to execute arbitrary code on affected installations of Microsoft Teams Desktop. An attacker must first obtain the ability to execute arbitrary JavaScript within an iframe within the application window in order to exploit this vulnerability.

oskarsv, on the Zero Day Initiative

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the top ElectronJS frame did not properly restrict navigation, allowing JavaScript in an iframe to redirect it to an attacker-controlled page and reach internal application objects.

Impact

An attacker who could already execute JavaScript within an iframe could navigate the top frame to a malicious page and execute arbitrary code in the context of the current process.

What the attacker needed

Ability to run JavaScript in an iframe; Microsoft Teams Desktop

The fix

It was fixed in version 1.4.00.11161.

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 report has not been written yet. The Original tab links to the source.

Microsoft Teams is built with Electron, which is a framework that lets web pages run like desktop apps. The report says that if an attacker could already run some JavaScript inside a small embedded web page (an iframe) in Teams, they could then make the main window load a page they control. That gave them access to internal parts of the app and let them run code on the victim's computer.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by oskarsv

View all

3 more disclosed reports, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.