litellm versions 1.82.7 and 1.82.8 were backdoored on March 24, 2026
by TeamPCP via a compromised Trivy CI/CD pipeline. browser-use 0.12.3
shipped litellm>=1.82.2 (unpinned) as a core dependency, exposing
~6,900 users to the backdoored versions during the 4-hour window.
This commit:
- Removes litellm entirely from pyproject.toml (core and optional)
- Keeps ChatLiteLLM wrapper intact with a docstring noting
`pip install litellm` is required separately
- litellm is already lazy-imported inside methods, so users who
don't use ChatLiteLLM are never affected
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add nav_timeout parameter to navigate_to_url_and_wait() method
- Pass nav_timeout from NavigateToUrlEvent to control CDP navigation timeout
- Fix issue where TIMEOUT_NavigateToUrlEvent env var only controlled outer timeout but CDP call had hardcoded 20s timeout
- Add comprehensive test case to verify env var controls CDP timeout
_prepare_context passes last_model_output/last_result to the message
manager for the "previous action result" prompt section. Clearing
them before context preparation drops this context.
Move the clear to after _prepare_context but before _get_next_action,
so prompt assembly still sees the previous step's output while
preventing stale data on timeout during the LLM call or action phase.
Two related bugs when step() is cancelled by timeout:
1. step() does not clear last_model_output/last_result at the start,
so if timeout occurs before _get_next_action, _finalize() sees
stale values from the previous step and records a duplicate history
entry with wrong step numbers.
2. _finalize() early-returns when last_result is falsy, skipping the
n_steps increment. On timeout, this means the while loop retries
the same step number repeatedly.
Fix: clear last_model_output and last_result at step() entry, and
ensure _execute_step increments n_steps after a timeout if _finalize
did not already do so.
When the install script is executed via `curl ... | bash`, it always
runs in a bash process, so $BASH_VERSION is always set regardless of
the user's actual shell. This causes PATH to be written to ~/.bashrc
even for zsh users, making the `browser-use` command unavailable.
Use $SHELL (the user's login shell) instead of $BASH_VERSION/$ZSH_VERSION
to detect the correct shell RC file.
Fixes#4440
- AGI-569: after any click that opens a new tab, automatically dispatch
SwitchTabEvent so the agent lands on the new page immediately instead
of requiring a manual switch step (~877 occurrences)
- AGI-548: for <input type="checkbox/radio">, capture checked state
before the CDP mouse click and verify it toggled afterward; if
unchanged (custom-styled or shadow-DOM-backed inputs), fall back to
JS element.click() and report the final checked state in metadata
(~1,241 occurrences)
- Updated the BrowserSession class to ensure the User-Agent header is set correctly for both local and remote connections.
- Introduced a utility function to retrieve the browser-use version and incorporated it into the User-Agent string.
- Ensured headers are consistently handled as dictionaries to avoid potential issues with None values.
This change improves the reliability of the CDP client communication by providing a proper User-Agent, which can be crucial for certain web interactions.
If list_chrome_profiles() returns empty (permissions, corrupt Local State,
first-run Chrome), skip resolution and use the profile value as-is instead
of always raising RuntimeError.
When ping fails but daemon is alive, return instead of trying to spawn
a second daemon. The old daemon holds the socket so the new one can't
bind, causing silent config mismatch.