Improper Authorization in saltstack/salt
Mar 5th 2022
When configuring saltstack to authentificate via the
salt.auth.pam module. The authorization of a account validity is missing. Therefore expired accounts, or accounts with expired passwords, can still login.
Proof of Concept
Configure salt with salt.auth.pam and run it with an expired account. To expire an PAM account use:
chage -E0 <username>
After successfull authentication with
pam_authenticateit's necessary to check the validity of an account with
pam_acct_mgmt(). This is done, but the return value is discarded and only the return value of
pam_authenticateis being used which results in skipping for authorization completely. Depending on how salt is configured this can become pretty severe. You don't revoke privileges for an account without a reason. As always I assume that the salt developers could estimate the severity way better than I could, so feel free to correct it.