Skip to content
RCE Advisory Advanced

(Pwn2Own) Microsoft Teams electronSafeIpc Arbitrary File Write Remote Code Execution Vulnerability

The communication API in Microsoft Teams mishandled the electronSafeIpc variable, allowing an attacker to write arbitrary files with controlled data. This could let a remote attacker execute code in the context of the current process.

Daniel Lim Wee Soong Follow

Originally disclosed on Zero Day Initiative

High 8.8 View original

This vulnerability allows remote attackers to execute arbitrary code on affected installations of Microsoft Teams. No user interaction is required if the attacker and target are in the same Teams organization.

Daniel Lim Wee Soong (@daniellimws), Li Jiantao (@CurseRed), Ngo Wei Lin (@Creastery), Poh Jia Hao (@Chocologicall) of STAR Labs, 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 communication API did not properly validate or restrict the electronSafeIpc variable, permitting an attacker to specify arbitrary file paths and contents for writing.

Impact

A remote attacker could execute arbitrary code on affected installations, and no user interaction is required if the attacker and target are in the same Teams organisation.

What the attacker needed

Attacker and target in same Teams organisation

The fix

The vulnerability was fixed by Microsoft on August 31, 2022.

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 has a part that lets different pieces of the app talk to each other. A mistake in how it handled a setting called electronSafeIpc meant an attacker could make the app save a file with content the attacker chose. By saving the right kind of file, the attacker could then run their own 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 Daniel Lim Wee Soong

View all

1 more disclosed report, 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.