Skip to content

KC-1446: Add shell-specific password validation to prevent command injection - #2339

Merged
amangalampalli-ks merged 4 commits into
fix/shell-password-validationfrom
fix/shell-password-validation-int
Sep 3, 2026
Merged

KC-1446: Add shell-specific password validation to prevent command injection#2339
amangalampalli-ks merged 4 commits into
fix/shell-password-validationfrom
fix/shell-password-validation-int

Conversation

@amangalampalli-ks

@amangalampalli-ks amangalampalli-ks commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fix SSH Windows password rotation command injection

Summary
SSH password rotation on Windows machines was vulnerable to command injection through special characters in passwords and usernames.

Changes

  • Block dangerous shell characters (&, $, (), whitespace, etc.) for SSH, PSPasswd & Unix password plugins
  • Validate both username and password before injecting into remote shell commands
  • Keep Windows local rotation restrictions minimal (doesn't use shell)

@amangalampalli-ks amangalampalli-ks self-assigned this Sep 1, 2026
@amangalampalli-ks
amangalampalli-ks marked this pull request as ready for review September 1, 2026 12:28
@amangalampalli-ks
amangalampalli-ks force-pushed the fix/shell-password-validation-int branch from 7f80e1b to 9d42eb1 Compare September 3, 2026 13:22
@amangalampalli-ks
amangalampalli-ks force-pushed the fix/shell-password-validation branch from 26d0449 to d8f7f7f Compare September 3, 2026 13:22
@amangalampalli-ks
amangalampalli-ks merged commit 5f14ac6 into fix/shell-password-validation Sep 3, 2026
2 checks passed
sk-keeper pushed a commit that referenced this pull request Sep 3, 2026
…jection (#2339)

* Add shell-specific password validation to prevent command injection

* Add backward compatibility

* Fix review comments

* Add unixpasswd in the ssh list and white space in regex
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.

2 participants