Skip to content
RCE Write-up Advanced

Exploiting Bitdefender Antivirus: RCE from any website

Bitdefender's HTTPS error pages exposed session tokens that any website could read, and these tokens allowed starting the Safepay browser with attacker-controlled command line flags. This led to arbitrary code execution on the user's system without interaction.

Wladimir Palant Follow

Published on palant.info

2020-06-22 Security/Bitdefender/Antivirus 8 mins

Wladimir Palant, on palant.info

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

Likely the antivirus handled certificate errors itself, exposing session tokens to web pages, and then passed untrusted data to a command line without proper escaping.

Impact

Any website could execute arbitrary code with the user's privileges without interaction, from any browser.

What the attacker needed

Victim visits a malicious website; Bitdefender Antivirus installed

The fix

Bitdefender fixed the vulnerability by pushing out updates, as confirmed in the timeline.

How it was found

  1. Set up a web server that first presents a valid certificate, then switches to an invalid one.
  2. Load a malicious page from that server and use XMLHttpRequest to fetch the resulting error page.
  3. Extract the session tokens from the error page.
  4. Send a request with those tokens and a data: URL containing whitespace and command line flags to start Safepay.
  5. Observe the command execution (e.g., whoami output).

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.

Antivirus software sometimes shows its own error pages for broken HTTPS connections. Because these pages appear to come from the website, any site can read secret codes inside them. Those codes let a malicious site launch the antivirus's secure browser with extra options that run commands on the 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 Wladimir Palant

View all

7 more disclosed reports, best first.

More from Bitdefender

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.