-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
safe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processing
Description
Location
sh/e2e/lib/provision.sh lines 176-177
Issue
The manual .spawnrc creation fallback uses double-quoted variable substitution in a remote command string:
if cloud_exec "${app_name}" "printf '%s' \"${env_b64}\" | base64 -d > ~/.spawnrc && chmod 600 ~/.spawnrc && ...While base64 encoding provides some protection, if env_b64 is corrupted or tampered with (e.g., from a compromised cloud driver or network MITM), it could lead to command injection when the remote shell evaluates the double-quoted string.
Recommendation
Pass the base64 data via stdin instead of command-line arguments:
printf '%s' "${env_b64}" | cloud_exec "${app_name}" "base64 -d > ~/.spawnrc && chmod 600 ~/.spawnrc && ..."Or use heredoc with proper escaping to avoid exposing the data in process arguments.
Severity
HIGH - potential command injection if base64 data is corrupted/tampered
Related
This also addresses credential exposure in process arguments (the base64 string is visible via ps aux on the local machine).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
safe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processing