Skip to content
Access control Write-up Intermediate

Reverse Engineering a Browser Extension Led Me to a Dangerous Exploit! ($25,000 Bounty)

A browser extension exposed a message handler that returned all stored cookies to any website without validating the sender's origin. An attacker could use this to steal session cookies and take over user accounts.

theindiannetwork Follow

Published on theindiannetwork.medium.com

What if I told you that a simple browser extension could be the weakest link in your cybersecurity? That a small oversight in its code could open the door to complete account takeover?

TheIndianNetwork, on theindiannetwork.medium.com

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

The extension's message listener did not validate the sender's origin before returning all cookies.

Impact

An attacker could steal session cookies and take over user accounts without needing a password.

What the attacker needed

Victim has the extension installed; victim visits a malicious webpage; attacker controls a server to receive data

The fix

The extension should validate the sender's origin before responding to messages, and the issue was fixed after responsible disclosure.

How it was found

  1. Extract and decompile the browser extension to review its manifest and background script.
  2. Identify a message handler that returns all cookies without checking the sender.
  3. Create a malicious webpage that sends a message to the extension requesting cookies.
  4. Set up a server to receive the stolen cookies.
  5. Inject the stolen session cookie into the browser to impersonate the victim.

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.

Browser extensions can have powerful permissions, like reading cookies. If an extension listens for messages from web pages and does not check who sent the message, any website can ask it for sensitive data. Here, a malicious site could ask for all cookies and then use them to log in as the victim.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by theindiannetwork

View all

23 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.