这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented May 5, 2025

This PR contains the following updates:

Package Change Age Confidence
browser-use ==0.1.23 -> ==0.1.45 age confidence

GitHub Vulnerability Alerts

CVE-2025-47241

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 = False

The _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 False

The 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.

Release Notes

browser-use/browser-use (browser-use)

v0.1.45

Compare Source

What's Changed

  • ✨Add NEW interactive CLI like claude code for browser-use by @​pirate in #​1559
  • 💔 BREAKING CHANGE: BrowserWindowContextSize object removed, switch to flat attrs instead. sorry for the trouble!
    change: BrowserContextConfig(window_size=BrowserWindowContextSize(width=1280, height=900)
    to: flat BrowserContextConfig(window_width=1280, window_height=900), used for viewport as well when no_viewport=False
    in #​1557
  • 🔒 fix security issue with url parsing of allowed_domains by @​pirate in #​1561
    _ _
  • fix(eval): update GOOGLE_API_KEY comment to GEMINI_API_KEY by @​morugu in #​1554
  • Fix: Make viewport_expansion=-1 parameter work properly to include all page elements by @​pyoneerC in #​1552
  • refactor: add caching for client rects and improve highlight cleanup logic by @​satya-nutella in #​1551
  • fix: add cursor:pointer handling in buildDomTree and update test URLs to handle expander icons by @​satya-nutella in #​1502
  • removing the browser channel from the _setup_browser in browser.py by @​pmajor74 in #​1538
  • Improve anti-bot fingerprint detection, should work with cloudflare sites and google logins now
  • Lowering the z-index by @​os1rix in #​1545
  • Support Azure OpenAI API GPT-4 by @​pyoneerC in #​1532
  • Ensure contenteditable fields are interactable by @​edwardysun in #​1548
  • Add Google Sheets support directly in main controller by @​pirate in #​1550

New Contributors

Full Changelog: browser-use/browser-use@0.1.43...0.1.45

v0.1.43

Compare Source

What's Changed

New Contributors

Full Changelog: browser-use/browser-use@0.1.42...0.1.43

v0.1.42

Compare Source

What's Changed

New Contributors

Full Changelog: browser-use/browser-use@0.1.41...0.1.42

v0.1.41

Compare Source

Better browser launching, more elements detected, improved logging, config, and much more...

🚀 Thank you all so much who worked on this massive release!
We appreciate all of your contributions and this was a massive effort by many people. Every day the library's capabilities and opportunities grow, and it just keeps getting better as more people show up to help! Thanks for bearing with us catching up with some of these PRs, we got such a flood of attention that it will take us a little while to fully catch up.

Discord Twitter Follow GitHub Issues.

🛠️ What's Changed

New Contributors


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@codesandbox
Copy link

codesandbox bot commented May 5, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented May 5, 2025

Reviewer's Guide

This pull request updates the browser-use dependency from version 0.1.23 to 0.1.45 by modifying the requirements.txt file. This update addresses a security vulnerability (CVE-2025-47241) in the allowed_domains feature.

Class Diagram: Update to BrowserContextConfig in browser-use v0.1.45

classDiagram
    class BrowserContextConfig_Old {
        <<Deprecated v0.1.45>>
        +browser_window_size: BrowserContextWindowSize
        +allowed_domains: list[str] | None
        +...
    }
    note for BrowserContextConfig_Old "Represents the configuration before v0.1.45"

    class BrowserContextConfig_New {
        <<Introduced v0.1.45>>
        +window_width: int
        +window_height: int
        +allowed_domains: list[str] | None
        +...
    }
    note for BrowserContextConfig_New "Represents the configuration from v0.1.45 onwards.\nSecurity fix applied to allowed_domains logic."
Loading

File-Level Changes

Change Details Files
Updated browser-use dependency to version 0.1.45.
  • Modified the version constraint in requirements.txt.
  • Incorporated security fix for CVE-2025-47241 related to URL parsing bypass in allowed_domains.
  • Introduced breaking change: BrowserWindowContextSize object removed, replaced by flat attributes window_width and window_height in BrowserContextConfig.
  • Included various other features, bug fixes, and refactoring from browser-use versions 0.1.24 through 0.1.45 (refer to release notes for details).
apps/browser-agent/requirements.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants