Skip to content
XSS Disclosed report Intermediate CVE-2019-15685

Unauthorized command execution in Web protection component of Anti-Virus products family [FF, Chrome]

The Kaspersky Protect browser extension sent data to its URL Advisor frame using window.postMessage without restricting the target origin, allowing any webpage to intercept the message and obtain the location of Kaspersky's command interface. An attacker could then use that interface to disable features such as Anti-Banner and Private Browsing, or add URLs to the blocklist.

palant Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 7 months
  • Paid in 13 days
  • Disclosed after 11 months

Summary When Kaspersky Protect browser extension is installed in Firefox or Chrome, arbitrary webpages can take control of the Kaspersky command interface and disable parts of the functionality for example.

Description Unlike with https://hackerone.com/reports/470544 or https://hackerone.com/reports/470547, with the Kaspersky Protect browser extension in Chrome and Firefox the extension functionality is properly isolated from the website. However, when the URL Advisor frame is being displayed, data is being sent to it via a regular window.postMessage() call without restricting the message recipient to specific origins. So a webpage can replace the frame's contents by some of its own and intercept this message. A particular piece of data contained in the message is the location of Kasperky's command interface. As a result, webpages can get full access to Kaspersky's command interface which allows disabling Anti-Banner and Private Browsing functionality for example (either completely or on specific sites), adding URLs to the blocklist and much more. Worse yet: by exposing Kaspersky's internal processing to the web, bugs in this processing code will turn into Remote Code Execution vulnerabilities allowing websites to execute code with the privileges of the SYSTEM user (I haven't explored this possibility further).

Environment

  • Scope: Application
  • Product name: Kaspersky Internet Security
  • Product version: 19.0.0.1088
  • OS name and version (incl SP): Windows 10.0.17134
  • Attack type: Command Injection
  • Maximum user privileges needed to reproduce your issue: no privileges

Steps to reproduce I tested this with Firefox 64 and Chrome 71.

  1. Go to Kaspersky settings and make sure that Anti-Banner and Private Browsing features are turned on.
  2. Download the attached ssl_server.py and disable_features3.html to some directory on your computer and run ssl_server.py (Python 3 required). This is a very rudimentary HTTPS server running on https://localhost:5000/ with an invalid certificate, you could use some other web server as well.
  3. Edit the file %WINDIR%\sysnative\drivers\etc\hosts as administrator and add the following line: 127.0.0.1 www.google.example.com. Normally, you would just use a subdomain of a domain you own and a valid certificate - the host name has to start with "www.google." for URL Advisor to apply to the site.
  4. Make sure that Kaspersky Protect browser extension is enabled in your browser.
  5. Go to https://www.google.example.com:5000/disable_features3.html with your browser (override warning about invalid certificate).
  6. Check Kaspersky settings and note that Anti-Banner and Private Browsing features are now disabled.

Impact

Websites gain full control of Kaspersky's command interface and can disable or manipulate its functionality. They can also attack potential vulnerabilities of the avp.exe process running with elevated privileges.

The original report as published on HackerOne, by palant. 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

The extension used window.postMessage to send sensitive data to a frame without specifying a target origin, so any page could intercept the message.

Impact

Websites could gain full control of Kaspersky's command interface, disabling or manipulating its functionality, and potentially exploit bugs in the privileged avp.exe process for remote code execution (though the reporter did not explore this further).

What the attacker needed

Kaspersky Protect browser extension installed; Victim visits a malicious webpage; Page URL starts with 'www.google.' for URL Advisor to apply

How it was found

  1. Ensure Anti-Banner and Private Browsing are enabled in Kaspersky settings.
  2. Run a local HTTPS server hosting a malicious HTML file.
  3. Add a hosts file entry mapping a domain starting with 'www.google.' to localhost.
  4. Enable the Kaspersky Protect browser extension.
  5. Visit the malicious page on the local server and accept the invalid certificate.
  6. Observe that Anti-Banner and Private Browsing are now disabled in Kaspersky settings.

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.

A browser extension from Kaspersky shows a small frame on web pages to warn about dangerous sites. The extension sent a message to that frame without checking who could see it, so any website could read the message and learn how to talk to Kaspersky's control system. That let the website turn off security features like ad blocking and private browsing.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by palant

View all

12 more disclosed reports, best first.

More from Kaspersky

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.