Skip to content

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

Merged
sk-keeper merged 1 commit into
releasefrom
fix/shell-password-validation
Sep 3, 2026
Merged

KC-1446: Add shell-specific password validation to prevent command injection#2346
sk-keeper merged 1 commit into
releasefrom
fix/shell-password-validation

Conversation

@amangalampalli-ks

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)

…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
@amangalampalli-ks amangalampalli-ks self-assigned this Sep 3, 2026
@amangalampalli-ks
amangalampalli-ks marked this pull request as ready for review September 3, 2026 13:33
@sk-keeper
sk-keeper merged commit 1a15f07 into release Sep 3, 2026
4 checks passed
@sk-keeper
sk-keeper deleted the fix/shell-password-validation branch September 3, 2026 16:02
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