Skip to content
XSS Disclosed report Intermediate

Kaspersky Password Manager is vulnerable to HTML injection in the browser action pop-up via user name

Kaspersky Password Manager's browser extension pop-up failed to escape user names, allowing stored HTML injection. An attacker could spoof the master password prompt and trick users into entering their password, though CSP prevented script execution.

palant Follow

Originally disclosed on HackerOne

  • Triaged in 2 hours
  • Fixed in 26 days
  • Paid in 8 days
  • Disclosed after 47 days

Note: According to https://www.securityweek.com/kaspersky-adds-password-manager-bug-bounty-program and some other sources, Kaspersky Password Manager is in scope for this program. The program description doesn't reflect this however.

Summary There is a stored XSS vulnerability in popover.html (the page being displayed as browser action pop-up in the Kaspersky Password Manager browser extension) via user names. While exploitation is complicated due to Content Security Policy, this isn't harmless either.

Description popover.html fails to escape user names, so this is a proper stored XSS vulnerability. However, Content Security Policy prevents arbitrary script execution here. What can still be done is injecting HTML code. For my proof of concept I chose to inject an external stylesheet and an iframe tag. The result is a perfectly spoofed master password prompt, for the user this is impossible to distinguish from the real thing.

Environment

  • Scope: Application
  • Product name: Kaspersky Password Manager
  • Product version: 9.0.1.447
  • OS name and version (incl SP): Windows 10 Version 1803
  • Attack type: XSS
  • Maximum user privileges needed to reproduce your issue: no privileges

Steps to reproduce

  1. Download the attached tricky_login.html, x.html, x.css files into a directory and make them available via any web server (localhost will do).
  2. Make sure Kaspersky Password Manager is installed in your browser and unlocked.
  3. Go to http://.../tricky_login.html with your browser (I tried this with Firefox 62 and Chrome 70).
  4. Enter any credentials into the login form and click "Log in."
  5. Allow Kaspersky Password Manager to save these credentials. Note that the dialog shows exactly the user name you entered - while the webpage manipulated it to add HTML code at the end, the HTML code follows after a number of spaces so that it is cut off in the display here.
  6. Now the page claims that something went wrong and asks you to try again. At the same time, KPM icons on the input fields also claim an issue and ask you to use the toolbar button - these icons have been manipulated by the website. Do as you are told and click the toolbar button.
  7. Note how the toolbar button displays a proper master password prompt to you. In Firefox you will see a warning but only if the web server isn't using HTTPS. Enter something into the master password field and click "Unlock."

You will see an alert message saying: "Gotcha! Your password is: ..." The page you entered your password on didn't belong to Kaspersky Password Manager, it was rather x.html from this proof of concept.

Impact

As long as CSP is enabled, the impact is limited. However, as this proof of concept illustrates, this still allows websites to spoof trusted KPM user interface and trick users into entering their passwords. At the very least, websites could inject tracking images to monitor KPM usage.

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

Likely the pop-up page inserted the user name into the HTML without escaping it, so HTML tags in the name were rendered.

Impact

As long as CSP is enabled, the impact is limited, but websites could still spoof the password manager's interface to trick users into entering their master password, or inject tracking images.

What the attacker needed

Victim uses the password manager extension; victim visits a malicious website; victim saves credentials on that site; victim follows the fake prompt to click the toolbar button

How it was found

  1. Host the provided proof-of-concept files on a web server.
  2. Ensure the password manager extension is installed and unlocked.
  3. Visit the proof-of-concept login page in the browser.
  4. Enter credentials and allow the password manager to save them.
  5. Follow the page's prompt to click the extension's toolbar button.
  6. Enter a master password in the spoofed prompt and click unlock.

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.

When you save a login, the password manager shows your username in its pop-up. It didn't clean that username, so a malicious site could sneak in extra web page code. That let the site fake the unlock screen and trick you into typing your master password.

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.