CVE-2025-47241: Browser Use allows bypassing `allowed_domains` by putting a decoy domain in http auth username portion of a URL
browser-use 0.1.44 and earlier lets the agent browse outside its allowed_domains list. A decoy allowed domain placed in the username part of a URL passes the check, while the browser connects to a different host, such as localhost. Upgrade browser-use to 0.1.45.
Published May 5, 2025 · Updated Oct 27, 2026 · Analysis Nov 24, 2026
What an attacker can do
BrowserContextConfig.allowed_domains limits where the agent may navigate. In browser_use/browser/context.py, _is_url_allowed() parses the URL, takes the netloc, lowercases it and strips a port with domain.split(':')[0]. That split is the flaw. A netloc can carry credentials before the at sign, so in example.com:pass@localhost:8080 the split at the first colon leaves example.com. The check approves it, but the browser connects to localhost:8080.
The advisory's proof of concept sets allowed_domains to ['example.com'] and visits a URL of that shape to reach a restricted internal service.
The attacker needs the agent to navigate to such a URL. That can come from a task prompt, a page the agent reads, or a link in content it processes, with no user interaction (the CVSS vector says network, no privileges, scope changed). The result is that the allowlist, which many teams use as their only guard, stops working. The advisory names enumeration of localhost services and internal networks and unauthorized browsing. It rates confidentiality high.
Who is affected
browser-use on PyPI up to and including 0.1.44, for anyone who sets allowed_domains and relies on it as a boundary. Without allowed_domains, the check returns true for every URL, so the allowlist offers no protection to begin with.
Check the version:
pip show browser-useSearch your code for allowed_domains to see whether you set it.
browser-use
- Ecosystem
- PyPI
- Affected
- <= 0.1.44
- Fixed in
- 0.1.45
- Check
pip show browser-use
How to fix it
Upgrade to browser-use 0.1.45:
pip install --upgrade browser-use==0.1.45The 0.1.45 release notes list the change as a security fix for URL parsing of allowed_domains, merged in pull request 1561. The notes give no further detail on how the check works now.
The advisory names no workaround. Until you upgrade, run the agent in a network that cannot reach localhost services or internal ranges, since the allowlist cannot be trusted on old versions.
How to tell if you were hit
Review agent logs and browser history for navigations to URLs that contain an at sign before the host, or whose username part looks like a domain name. Check access logs of internal services and localhost ports for requests that came from the agent's browser at times when it should have been limited to allowed sites.
If the agent runs behind an egress proxy, look for connections to private address ranges. Beam can record agent shell commands and file access, but it does not see browser navigation inside this library.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
During a manual source code review, **ARIMLABS.AI** researchers identified that the browser_use module includes an embedded whitelist functionality to restrict URLs that can be visited. This restriction is enforced during agent initialization. However, it was discovered that these measures can be bypassed, leading to severe security implications.
Details
File: browser_use/browser/context.py
The BrowserContextConfig class defines an allowed_domains list, which is intended to limit accessible domains. This list is checked in the _is_url_allowed() method before navigation:
@dataclass
class BrowserContextConfig:
"""
[STRIPPED]
"""
cookies_file: str | None = None
minimum_wait_page_load_time: float = 0.5
wait_for_network_idle_page_load_time: float = 1
maximum_wait_page_load_time: float = 5
wait_between_actions: float = 1
disable_security: bool = True
browser_window_size: BrowserContextWindowSize = field(default_factory=lambda: {'width': 1280, 'height': 1100})
no_viewport: Optional[bool] = None
save_recording_path: str | None = None
save_downloads_path: str | None = None
trace_path: str | None = None
locale: str | None = None
user_agent: str = (
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36'
)
highlight_elements: bool = True
viewport_expansion: int = 500
allowed_domains: list[str] | None = None
include_dynamic_attributes: bool = True
_force_keep_context_alive: bool = FalseThe _is_url_allowed() method is responsible for checking whether a given URL is permitted:
def _is_url_allowed(self, url: str) -> bool:
"""Check if a URL is allowed based on the whitelist configuration."""
if not self.config.allowed_domains:
return True
try:
from urllib.parse import urlparse
parsed_url = urlparse(url)
domain = parsed_url.netloc.lower()
# Remove port number if present
if ':' in domain:
domain = domain.split(':')[0]
# Check if domain matches any allowed domain pattern
return any(
domain == allowed_domain.lower() or domain.endswith('.' + allowed_domain.lower())
for allowed_domain in self.config.allowed_domains
)
except Exception as e:
logger.error(f'Error checking URL allowlist: {str(e)}')
return FalseThe core issue stems from the line domain = domain.split(':')[0], which allows an attacker to manipulate basic authentication credentials by providing a username:password pair. By replacing the username with a whitelisted domain, the check can be bypassed, even though the actual domain remains different.
Proof of Concept (PoC)
Set allowed_domains to ['example.com'] and use the following URL:
https://example.com:pass@localhost:8080
This allows bypassing all whitelist controls and accessing restricted internal services.
Impact
- Affected all users relying on this functionality for security.
- Potential for unauthorized enumeration of localhost services and internal networks.
- Ability to bypass domain whitelisting, leading to unauthorized browsing.
Credited to mmudryi, markiyanch.
Questions
- Does browser-use 0.1.44 have this bug?
Yes. Versions up to and including 0.1.44 are affected. Version 0.1.45 is the first patched release, per the advisory.
- How does the bypass work?
The URL's credentials section is read as the host: example.com:pass@localhost:8080 passes an allowlist for example.com, but the browser connects to localhost. The check strips everything after the first colon in the netloc.
- Am I at risk if I never set allowed_domains?
The bypass does not matter then, because without the list every URL is allowed anyway. The risk applies to setups that rely on the list to keep the agent away from internal services.
- Is it exploited in the wild?
No source reports exploitation, and the entry has no KEV record. The advisory credits researchers from ARIMLABS.AI with the report.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
