AI Security
Does Browser Use Redact Sensitive Data?
Query
Does browser-use automatically remove passwords, credit card numbers, SSNs, or other sensitive data from the browser state it sends to the LLM?
Research and testing
- Reviewed browser-use source on the main branch:
utils.py,dom/views.py,dom/service.py,agent/service.py, andagent/views.py. - Reviewed the sensitive-data and secure-setup documentation.
- Reviewed GitHub issues #713, #1062, and #1907, and arXiv 2512.07725, a study of browser-agent privacy practices.
Methodology
The code that builds the LLM context, captures screenshots, and writes logs was traced and checked for any filtering by field type or data pattern. Fifteen sources were reviewed, and each finding was rated by severity.
Results
No. Protection is opt-in and covers only values registered in advance.
- No password-field handling (critical).
valueis one of 44 attributes the DOM layer sends by default, and the method that chooses an element's text reads it first, with no check fortype="password". Browsers usually hide password values from DOM inspection, but any sensitive input that isn't masked will be sent. - Nothing is filtered unless you ask (critical). The only protection is the
sensitive_dataparameter, which replaces strings you register with<secret>KEY</secret>placeholders and types the real values after the model responds. It can't protect values you don't know in advance, such as a one-time code or a value the page loads. - Screenshots bypass text filtering (critical). A screenshot is captured on every step regardless of settings. When vision is on it goes to the model, and anything visible can be read from the image.
- Bugs in the sensitive-data path (high). Controller logs printed real passwords (issue #713, fixed in PR #724). Version 0.2.4 typed the dictionary key instead of the value (issue #1907, fixed in PR #1909). Issue #1062 reports the feature not working with some OpenAI models.
- Password encryption off on Linux (high). arXiv 2512.07725 found browser-use disables encryption for Chromium's saved passwords on Linux, so any credentials saved in the agent's profile sit unencrypted on disk.
- No PII patterns anywhere (high). The codebase has no Luhn check, card-number filter, SSN pattern, or IBAN or account-number detection. A page that shows account numbers sends them to the model in full.
- Cloud models get the full browser state (medium). With a cloud API, page content leaves the machine, and users have "little to no control over how that data is processed and shared" (arXiv 2512.07725). The same study found browser-use does not block sites with self-signed or revoked certificates.
| Data | Detected automatically | Opt-in protection |
|---|---|---|
| Password fields | No | Partial: must be registered, still visible in screenshots |
| Credit card numbers | No | No |
| SSNs and tax IDs | No | No |
| Account numbers | No | No |
| Registered credentials and API keys | No | Yes, except in screenshots |
| Other personal data shown on a page | No | No |
Mitigations
- Set
use_vision=Falsefor any task that touches a login or account page. - Never put raw credentials in the task prompt. Use
sensitive_datawithallowed_domainsset; without it, an injected page can collect registered secrets. - Log in with saved session cookies (
storage_state) so credentials never reach the model. - Put a PII-scrubbing gateway between browser-use and the model API.
- Don't use it with financial, medical, or legal data without an independent security review.
Sources
- browser_use/utils.py: redact_sensitive_string
- browser_use/dom/views.py: DEFAULT_INCLUDE_ATTRIBUTES, get_meaningful_text_for_llm
- browser_use/dom/service.py
- browser_use/agent/service.py: screenshot capture
- browser_use/agent/views.py: history filtering
- browser-use docs: sensitive data
- browser-use docs: secure setup
- browser-use #713: credentials in controller logs
- browser-use #1062: sensitive data not working with OpenAI
- browser-use #1907: key used instead of value (v0.2.4)
- arXiv 2512.07725: Privacy practices of browser agents