Summary
scripts/verify.sh loads its configuration with source .env (line 18), which executes the file as arbitrary shell code. scripts/deploy.sh had this exact vulnerability and was fixed (see closed issue #455) by replacing source with a safe line-by-line load_env parser that only accepts KEY=VALUE pairs. That fix was never applied to verify.sh.
Current Behavior
scripts/verify.sh:18 runs:
Any shell metacharacters, command substitutions, or malicious lines in .env (which may be populated from copy-pasted testnet output or third-party contributions) are executed with the privileges of whoever runs verify.sh.
Expected Behavior
verify.sh should load .env using the same safe load_env line-by-line parser already implemented in deploy.sh, ideally by extracting it into a shared helper both scripts source, so verify.sh gets the same CVE-class protection.
Acceptance Criteria
Tech Stack
Bash — scripts/verify.sh, cross-reference scripts/deploy.sh's load_env function
Summary
scripts/verify.shloads its configuration withsource .env(line 18), which executes the file as arbitrary shell code.scripts/deploy.shhad this exact vulnerability and was fixed (see closed issue #455) by replacingsourcewith a safe line-by-lineload_envparser that only acceptsKEY=VALUEpairs. That fix was never applied toverify.sh.Current Behavior
scripts/verify.sh:18runs:source .envAny shell metacharacters, command substitutions, or malicious lines in
.env(which may be populated from copy-pasted testnet output or third-party contributions) are executed with the privileges of whoever runsverify.sh.Expected Behavior
verify.shshould load.envusing the same safeload_envline-by-line parser already implemented indeploy.sh, ideally by extracting it into a shared helper both scripts source, soverify.shgets the same CVE-class protection.Acceptance Criteria
verify.shno longer callssource .envdirectly.envis parsed with the same safe KEY=VALUE-only logic used indeploy.sh.envvalues cannot cause code execution when runningverify.sh.envfilesTech Stack
Bash —
scripts/verify.sh, cross-referencescripts/deploy.sh'sload_envfunction