-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
in-progressIssue is being actively worked onIssue is being actively worked onsafe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processingsecuritySecurity vulnerabilities and concernsSecurity vulnerabilities and concerns
Description
Location
sh/e2e/lib/provision.sh line 176
Vulnerability
When creating a manual .spawnrc fallback, the script expands ${env_b64} directly into a double-quoted remote command string:
if cloud_exec "${app_name}" "printf '%s' \"${env_b64}\" | base64 -d > ~/.spawnrc ...If the env_b64 variable is corrupted or contains shell metacharacters (which shouldn't happen with base64, but could via memory corruption, race conditions, or other attacks), this could lead to command injection.
Current Mitigation
The risk is partially mitigated because:
env_b64is base64-encoded from a temp file- Base64 output only contains
[A-Za-z0-9+/=]characters - The temp file is created locally (not from untrusted input)
However, the code violates defense-in-depth principles by relying on base64 correctness.
Recommended Fix
Pass the base64 data via stdin instead of interpolating it:
printf '%s' "${env_b64}" | cloud_exec "${app_name}" "base64 -d > ~/.spawnrc && chmod 600 ~/.spawnrc && ..."Or use a here-document if cloud_exec supports it.
Severity
MEDIUM - Low exploitability but violates secure coding best practices.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in-progressIssue is being actively worked onIssue is being actively worked onsafe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processingsecuritySecurity vulnerabilities and concernsSecurity vulnerabilities and concerns