-
Notifications
You must be signed in to change notification settings - Fork 383
Closed
Labels
state:review-readyReady for human reviewReady for human reviewtopic:securitySecurity issuesSecurity issueswontfixThis will not be worked onThis will not be worked on
Milestone
Description
Summary
When loading the dev sandbox policy, the CLI checks the NAVIGATOR_SANDBOX_POLICY environment variable. If set, it is used as a file path and the file is read with std::fs::read_to_string(path). The path is not canonicalized or validated; it is not restricted to a safe directory. If an attacker can set this environment variable, they can read arbitrary files the process can access. Parse failures can leak file content in the error message.
Source Code
- In
crates/navigator-cli/src/run.rs,load_dev_sandbox_policy(lines 1231-1245) doesstd::env::var("NAVIGATOR_SANDBOX_POLICY"). On success it setspath = Path::new(&policy_path)and callsstd::fs::read_to_string(path)with no canonicalization or check that the path stays within a safe tree.
Originally by @drew on 2026-02-19T09:01:55.805-08:00
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
state:review-readyReady for human reviewReady for human reviewtopic:securitySecurity issuesSecurity issueswontfixThis will not be worked onThis will not be worked on