Skip to content

The agent that grows with you

docs(security): allow_private_urls guards cloud browsers and web tools, not the local sidecar

Teknium62f79a434d15
diff --git a/cli-config.yaml.example b/cli-config.yaml.example
index a6527d9d01a..e1aebd715ca 100644
--- a/cli-config.yaml.example
+++ b/cli-config.yaml.example
@@ -581,6 +581,11 @@ terminal:
# Security
# =============================================================================
# security:
+# # Private/internal addresses (localhost, 192.168.x.x, CGNAT) for web_extract,
+# # vision/media URL fetches and cloud/CDP browsers. The local Chromium and the
+# # hybrid sidecar (browser.auto_local_for_private_urls) are not covered.
+# # Cloud-metadata endpoints stay blocked even when true.
+# allow_private_urls: false
# approval:
# transport: builtin # Or an explicitly enabled plugin transport name
# transport_fallback: deny # Set builtin to opt into fallback on transport failure
@@ -622,6 +627,12 @@ browser:
# user_data_dir: ""
# chromium_args: ["--lang=de"]
+ # With a cloud provider (Browserbase, Browser Use, ...), LAN/localhost URLs
+ # open in a local Chromium sidecar on this host instead. The sidecar ignores
+ # security.allow_private_urls (like the plain local Chromium, it reaches what
+ # the terminal reaches); set false to refuse private URLs instead.
+ # auto_local_for_private_urls: true
+
# =============================================================================
# Tool Loop Guardrails
# =============================================================================
diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.py
index 9ff7e416f46..d7eb16119fa 100644
--- a/hermes_cli/config_defaults.py
+++ b/hermes_cli/config_defaults.py
@@ -420,7 +420,7 @@ DEFAULT_CONFIG = {
"command_timeout": 30,
# headed: visible Chromium window (local); skips per-turn cleanup, idle reaper still applies
"headed": False,
- "allow_private_urls": False, # allow private/internal IPs (localhost, 192.168.x.x, ...)
+ "allow_private_urls": False, # legacy security.allow_private_urls; local/sidecar Chromium ignore it
# Local browser engine. "auto" = Chromium; "lightpanda" = `lightpanda serve` per session
# (faster navigation, no screenshots); "chrome" is read as "auto". Ignored while a cloud
# provider, cdp_url or use_real_profile is active.
@@ -432,7 +432,7 @@ DEFAULT_CONFIG = {
# profile per session.
"user_data_dir": "",
"chromium_args": [], # extra Chromium flags for local sessions, e.g. ["--lang=de"]
- # With a cloud provider, auto-spawn local Chromium for LAN/localhost URLs instead
+ # Cloud provider: LAN/localhost URLs open in a local Chromium (ignores allow_private_urls; False refuses)
"auto_local_for_private_urls": True,
"cdp_url": "", # persistent CDP endpoint for attaching to an existing Chromium/Chrome
# Consent to browse with the user's REAL logins locally: runs on a Hermes-managed SNAPSHOT
@@ -1754,7 +1754,7 @@ DEFAULT_CONFIG = {
"codex_login_flow": "device_code",
},
"security": { # Security: URL/private-network guards, redaction and approval presentation.
- "allow_private_urls": False, # allow requests to private/internal IPs (OpenWrt, VPNs)
+ "allow_private_urls": False, # private IPs for web/vision/media + cloud/CDP browsers; not local/sidecar Chromium
# CIDR blocks a local TUN proxy answers DNS with (Mihomo/Clash fake-ip, Surge enhanced).
# Answers inside these blocks are the proxy's sentinels, not internal hosts, so the guard
# dials them instead of rejecting them as private. Empty = normal private-address verdict.
diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md
index eaae3d8521c..1ebaadb8a5e 100644
--- a/website/docs/user-guide/configuration.md
+++ b/website/docs/user-guide/configuration.md
@@ -2876,7 +2876,8 @@ browser:
# Cloud browser selection (written by `hermes tools` → Browser Automation)
cloud_provider: local # local | browserbase | browser-use | firecrawl | nous | <provider plugin>; unset = autodetect from credentials
auto_local_for_private_urls: true # With a cloud provider, open LAN/localhost URLs in a local Chromium
- allow_private_urls: false # Allow private/internal addresses (localhost, 192.168.x.x, ...)
+ # (ignores allow_private_urls; false = refuse them instead)
+ allow_private_urls: false # Legacy alias of security.allow_private_urls (guards cloud/CDP browsers, not the local Chromium)
# Optional CDP override — when set, the browser tools attach to your own
# Chromium-family browser (as /browser connect does) instead of launching one.
cdp_url: ""
diff --git a/website/docs/user-guide/features/browser.md b/website/docs/user-guide/features/browser.md
index 9234b6bceba..eecfd6a7e00 100644
--- a/website/docs/user-guide/features/browser.md
+++ b/website/docs/user-guide/features/browser.md
@@ -108,6 +108,12 @@ and it works on headless servers with no desktop browser at all.
- **Automatic cleanup.** The browser is closed after `browser.inactivity_timeout`
seconds idle (default 120), when Hermes exits, and by an orphan sweep if a
process crashed.
+- **Private hosts are reachable.** With a local terminal backend, the local
+ Chromium can open `localhost` and LAN addresses whatever
+ `security.allow_private_urls` says: it reaches nothing the terminal can't.
+ The private-address guard applies when the browser can reach networks the
+ terminal can't (a cloud provider, a `/browser connect` endpoint, or a
+ Docker/SSH/Modal terminal backend). Cloud-metadata endpoints are always refused.
**Which Chromium.** Hermes picks the first that exists:
@@ -257,8 +263,13 @@ the agent can screenshot your dashboard at `http://localhost:3000` AND scrape
`https://github.com` without you switching providers or disabling the SSRF guard.
The cloud provider never sees the private URL.
-The feature is **on by default**. To disable it (all URLs go to the configured
-cloud provider):
+The feature is **on by default**, and it is not governed by
+`security.allow_private_urls`: that setting guards the cloud browser and the web
+tools, but the sidecar runs on the Hermes host and opens private hosts with it
+off, the same way a `curl http://localhost` from the terminal would. A hosted
+Hermes (Docker, a VPS) therefore lets the agent browse that host's own
+loopback services and its LAN through the sidecar. To refuse private URLs
+instead (all URLs go to the configured cloud provider):
```yaml
# ~/.hermes/config.yaml
@@ -269,13 +280,15 @@ browser:
With auto-routing disabled, private URLs are rejected with
`"Blocked: URL targets a private or internal address"` unless you also set
-`browser.allow_private_urls: true` (which lets the cloud provider attempt them —
-usually won't work since Browserbase etc. can't reach your LAN).
+`security.allow_private_urls: true` (or the legacy `browser.allow_private_urls: true`),
+which hands them to the cloud provider — usually useless, since Browserbase etc.
+can't reach your LAN. Cloud-metadata endpoints (`169.254.169.254`,
+`metadata.google.internal`) are refused on every route, sidecar included.
The sidecar is the same local Chromium described [above](#local-chromium-default),
-so it needs that Chromium installed. Post-navigation redirects from a public URL
-onto a private address are still blocked (you can't use a redirect-to-internal
-trick to reach your LAN through the public path).
+so it needs that Chromium installed. Routing is decided from the URLs written in
+the `browser_exec` code: a public page that later redirects to a private address
+stays on the cloud browser, which cannot reach your network.
## Real profile browsing (use your own logins)
diff --git a/website/docs/user-guide/security.md b/website/docs/user-guide/security.md
index 36846c633b2..c6c957d014e 100644
--- a/website/docs/user-guide/security.md
+++ b/website/docs/user-guide/security.md
@@ -793,6 +793,27 @@ When on, web tools, the browser, vision URL fetches, and gateway media downloads
The host-substring guard (which blocks lookalike Unicode domain tricks even when the underlying IP is public) stays on regardless of this setting.
+#### What `allow_private_urls` covers, and what it doesn't
+
+The setting guards the fetches Hermes makes or hands to a remote browser; it does
+not stop every route to a private host. With it `false`:
+
+| Surface | Private URL (`localhost`, `192.168.x.x`, ...) |
+|---|---|
+| `web_extract` | Refused before any backend is called. With it `true`, hosted extract backends still fetch from their own servers and cannot reach your LAN. |
+| `vision_analyze` URL fetches, image/video result downloads, gateway media downloads | Refused |
+| `browser_exec` on a cloud provider with `browser.auto_local_for_private_urls: false`, on a `/browser connect` (CDP) endpoint, or with a Docker/SSH/Modal terminal backend | Refused (`Blocked: URL targets a private or internal address`) |
+| `browser_cdp` raw CDP calls on those same backends | Refused for private page URLs |
+| `browser_exec` on a cloud provider with `browser.auto_local_for_private_urls: true` (the default) | **Opens**, in a local Chromium sidecar on the Hermes host ([hybrid routing](./features/browser.md#hybrid-routing-cloud-for-public-urls-local-for-lanlocalhost)) |
+| `browser_exec` on the local Chromium with a local terminal backend | **Opens**: the browser reaches nothing the terminal can't |
+| `terminal` (`curl http://localhost`, ...) | **Opens**: no URL guard |
+
+Cloud-metadata endpoints are refused on every row except `terminal`, sidecar and
+local Chromium included. To keep the agent's browser off private hosts while a cloud provider is
+configured, set `browser.auto_local_for_private_urls: false`; that matters most on
+hosted installs (Docker, a VPS), where the sidecar sees the host's own loopback
+services and its LAN.
+
#### Local proxy fake-ip ranges
A TUN proxy in fake-ip mode (Mihomo/Clash `fake-ip`, Surge enhanced mode) answers DNS with an