OpenSC pam_pkcs11
PAM-PKCS#11 vulnerable to authentication bypass with default value for `cert_policy` (`none`)
PAM-PKCS#11 is a Linux-PAM login module that allows a X.509 certificate based user login. Prior to version 0.6.13, if cert_policy is set to none (the default value), then pam_pkcs11 will only check if the user is capable of logging into the token. An attacker may create a different token with the user's public data (e.g. the user's certificate) and a PIN known to the attacker. If no signature with the private key is required, then the attacker may now login as user with that created token. The default to *not* check the private key's signature has been changed with commit commi6638576892b59a99389043c90a1e7dd4d783b921, so that all versions starting with pam_pkcs11-0.6.0 should be affected. As a workaround, in `pam_pkcs11.conf`, set at least `cert_policy = signature;`.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 0.6.13
Fixed in 0.6.13
Mitigation
Upgrade pam_pkcs11 to 0.6.13 or later.
References
- Vendor advisory github.com/OpenSC/pam_pkcs11/security/advisori…
- Patch github.com/OpenSC/pam_pkcs11/commit/470263258d…
- Patch github.com/OpenSC/pam_pkcs11/commit/b665b287ff…
2 more
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.