Skip to content
RCE Disclosed report Advanced CVE-2022-44567

Insecure use of shell.openExternal() leads to RCE in Rocket.Chat-Desktop

Rocket.Chat-Desktop passed a URL parameter from its internal API to the operating system's external URL opener without validation. An attacker who could run script in the client could use this to launch a local program and execute code.

sectex Follow

Originally disclosed on HackerOne

  • Triaged in 14 days
  • Fixed in 14 days
  • Disclosed after 16 days

Summary by the program

Rocket.Chat-Desktop passes the parameter url of openInternalVideoChatWindow to shell.openExternal(), which may lead to remote code execution (internalVideoChatWindow.ts#L17). To exploit the vulnerability, the internal video chat window must be disabled or a Mac App Store build must be used (internalVideoChatWindow.ts#L14). The vulnerability may be exploited by an XSS attack because the function openInternalVideoChatWindow is exposed in the Rocket.Chat-Desktop-API.

The original report as published on HackerOne, by sectex. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 app passed an untrusted URL straight to the operating system's external URL handler without restricting the scheme or target.

Impact

An attacker could achieve remote code execution, but only when the internal video chat window is disabled or a Mac App Store build is used, and it requires an XSS first.

What the attacker needed

Internal video chat window disabled or Mac App Store build; ability to run script in the client (XSS)

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.

Desktop apps can ask the operating system to open a link in the default browser. If the app does not check what kind of link it is, a malicious link can start a program on the computer instead. Here, a script running inside the chat client could abuse that to run code.

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 sectex

View all

5 more disclosed reports, best first.

More from Rocket.Chat

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.