Email me

Rust advisories / webbrowser

VulnerabilityRUSTSEC-2026-0257 · webbrowser

RUSTSEC-2026-0257: Unix `BROWSER` handling allows browser argument injection

Short answerA security vulnerability in the webbrowser crate: Unix `BROWSER` handling allows browser argument injection. No severity score was published. Fixed in 1.2.2: update to a fixed version.

Cratewebbrowser
TypeVulnerability (format-injection)
Affected versionsBefore 1.2.2.
Fixed in1.2.2
Severitynot scored
Published2026-07-29
Last changed2026-10-12
Also known asGHSA-2ph8-5cr8-hr33
Affected functionswebbrowser::open, webbrowser::open_browser, webbrowser::open_browser_with_options

What to do

  1. See which version you have: cargo tree -i webbrowser (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p webbrowser. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example webbrowser = "1.2.2") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

On Unix platforms handled by src/unix.rs, affected versions substitute the caller-supplied URL into the BROWSER environment-variable template before tokenizing the resulting string with split_ascii_whitespace(). If an application passes an attacker-controlled non-HTTP(S) URL whose parsed form retains spaces and the effective BROWSER template contains %s, text that should remain within one URL argument becomes additional browser arguments.

The issue was reproduced with Chromium by injecting --remote-debugging-port, which exposed a local DevTools endpoint, and --proxy-server, which redirected browser traffic through an attacker-controlled proxy. The available arguments and resulting impact depend on the browser launched by the affected application.

Version 1.2.2 fixes the issue by tokenizing the BROWSER template before substituting the URL, preserving the URL as part of a single argument. Users should upgrade to version 1.2.2 or later. Applications that only need HTTP(S) URLs can also enable the crate's hardened feature as defense in depth.

This issue was reported by @dywzju09-blip.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Other advisories for webbrowser

Full security history of webbrowser

Up next

Same cratewebbrowser: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ