URL Spoof / Brave Shield Bypass
Brave's shield settings were applied based on a hostname parsed with Node's legacy url.parse, which treats a backtick-encoded hostname as part of the path, while the renderer loads the actual domain. An attacker could spoof a whitelisted domain to keep shields disabled or enable Flash.
Originally disclosed on HackerOne
- Triaged in 6 days
- Fixed in 7 days
- Paid in 6 days
- Disclosed after 29 days
Summary:
Improper URL parsing in Brave allows an attacker to spoof the hostname shield settings are applied to.
POC:
Products affected:
- Brave (browser-laptop) 0.18.14 rev ad92d02
Steps To Reproduce:
- Browse to http://brave.com
- Click on the Shield icon and toggle the shield from "up" to "down"
- Browse to http://brave.com%60x.code-fu.org/ and notice the shield is down for this domain as well.
I believe this could be used enable flash by spoofing one of the "whitelisted" domains.
The renderer will load the code-fu.org domain, however I believe when the URL is later parsed in node it uses (non standards compliant?) url.parse. This leads to some confusion:
> url.parse('http://brave.com%60x.code-fu.org/')
Url {
href: 'http://brave.com/%60x.code-fu.org/'
protocol: 'http:',
host: 'brave.com',
hostname: 'brave.com',
pathname: '%60x.code-fu.org/',
path: '%60x.code-fu.org/',
}
vs
> new url.URL('http://brave.com%60x.code-fu.org/')
URL {
href: 'http://brave.com`x.code-fu.org/',
protocol: 'http:',
host: 'brave.com`x.code-fu.org',
hostname: 'brave.com`x.code-fu.org',
pathname: '/',
}
Node now (7+) supports the the WHATWG through the url.URL . This seems to be the same / compatible with the way the render / chrome parses the URL.
Attachments

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 shield settings used Node's legacy url.parse, which does not follow the same hostname parsing rules as the browser renderer, causing a mismatch.
Impact
An attacker could make a malicious site inherit shield settings from a whitelisted domain, potentially keeping shields off or enabling Flash.
What the attacker needed
Victim visits a crafted link; target domain is whitelisted for shields
The fix
Using a standards-compliant parser such as the WHATWG URL API would make shield settings and the renderer agree on the hostname.
How it was found
- Browse to brave.com
- Toggle the shield from up to down for that site
- Browse to a crafted address that begins with brave.com but resolves to a different domain
- Observe the shield remains down for the different domain
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 has to decide which website it is on to apply settings like ad blocking. Brave used one method to read the address and the page renderer used another, so they disagreed about the site name. This let a crafted address look like a trusted site to the settings code while actually loading a different site.
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.