π‘οΈ Sentinel: [CRITICAL] Fix arbitrary command execution via unvalidated bitcoin-cli path#34
Conversation
Adds explicit allowlist and structural validation to the user-provided `bitcoin_cli` configuration value prior to spawning a new shell process. Co-authored-by: bitcoiner-dev <75873427+bitcoiner-dev@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π¨ Severity: CRITICAL
π‘ Vulnerability: The
bitcoin_cliparameter sourced from the user profile json was used directly as the target executable instd::process::Command::new(). While immune to bash shell injections likebitcoin-cli ; rm -rf /, it still allowed an attacker with file write access to the config to specify any system binary as thebitcoin_cliexecutable (e.g.,/bin/sh,/usr/bin/python, orC:\Windows\System32\cmd.exe), which would then be executed with attacker-controlled arguments via thebitcoin_cli_argsarray.π― Impact: Local arbitrary command execution.
π§ Fix: Implemented
validate_bitcoin_cli_pathto strictly enforce that the provided path must:..)bitcoin-cliorbitcoin-cli.exebitcoin-cliorbitcoin-cli.exe.β Verification:
cargo test --bin zinc-cliverifies the new path enforcement checks.PR created automatically by Jules for task 14179680337620087440 started by @bitcoiner-dev