You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Security] restoreState navigates to saved URLs without validation #674
browse/src/browser-manager.ts:633-635 — restoreState() calls page.goto(saved.url) without running validateNavigationUrl(). State files loaded from disk via the state load command could contain file://, chrome://, or cloud metadata URLs that would bypass the scheme/host blocklist enforced by newTab() and goto.
Reproduction
# Save state normally$B state save mystate
# Tamper with the state file — inject a blocked URL# Edit ~/.gstack/browse-states/mystate.json:# Change a page URL to "file:///etc/passwd"# Load the tampered state$B state load mystate
# → Browser navigates to file:///etc/passwd without validation
Severity
Medium — requires local file tampering, but bypasses all URL validation.
Fix
PR #664 adds validateNavigationUrl(saved.url) before page.goto in restoreState(). Blocked URLs are skipped. 5 tests added to url-validation.test.ts.
Found via sqry AST-based semantic code graph analysis.
Activity
fix: validate saved URLs before navigating in restoreState
garrytan commentedon Apr 13, 2026
Fixed in commit
c151fabf(PR #664, v0.15.13.0).restoreStatenow callsvalidateNavigationUrl(saved.url)beforepage.goto.