Skip to content

Fix command injection in change_permissions_to_root - #120

Open
szachovy wants to merge 1 commit into
masterfrom
fix/85-sftp-chmod-injection
Open

Fix command injection in change_permissions_to_root#120
szachovy wants to merge 1 commit into
masterfrom
fix/85-sftp-chmod-injection

Conversation

@szachovy

@szachovy szachovy commented Apr 8, 2026

Copy link
Copy Markdown
Owner

Replace ssh_client.exec_command(f'chmod 600 {filepath}') with sftp_client.chmod(filepath, 0o600). The shell-interpolated filepath allowed injection of arbitrary commands via crafted filenames.

Closes #85

Replace ssh_client.exec_command(f'chmod 600 {filepath}') with
sftp_client.chmod(filepath, 0o600). The shell-interpolated filepath
allowed injection of arbitrary commands via crafted filenames.

Closes #85

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CV-1: Command injection via unescaped filepath in SSH command

1 participant