Skip to content
RCE Write-up Beginner

I found RCE on Viber.

A researcher showed that Viber lets a user drag a .pyw file into a chat and send it, and when the recipient clicks it, Windows runs it as a Python program. An attacker could send such a file to someone who has Python installed and potentially run malicious code on their machine.

deadoverflow Follow

Published on medium.com

The original lives on medium.com

We do not hold its text, 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

Likely the chat client passes received files to the operating system's default handler without warning, so a script file is executed when the user opens it.

Impact

An attacker could send a script file to a victim who has Python installed, and if the victim opens it, code could run on their machine; the author notes this is debatable as an RCE because Viber itself does not execute the file.

What the attacker needed

Victim has Python installed; victim clicks the received file

How it was found

  1. Create a .pyw file.
  2. Drag and drop the file into a Viber chat.
  3. Click the file in the chat to open it.
  4. The file executes as a Python program.

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.

A .pyw file is a Python script that Windows runs when you open it, if Python is installed. Viber does not run the file itself; it just asks Windows to open it, and Windows then runs the script. So the danger comes from the recipient clicking a file they were sent, not from a flaw inside Viber.

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 deadoverflow

View all

3 more disclosed reports, best first.

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.