CVE-2025-24531: 
Linux Debian vulnerability analysis and mitigation

Overview

CVE-2025-24531 is an authentication bypass vulnerability in OpenSC's pam_pkcs11 module (versions up to and including 0.6.12) where pam_sm_authenticate() incorrectly returns PAM_IGNORE in numerous error conditions — such as a smartcard triggering a crypto initialization failure — instead of returning a proper failure code. This regression was introduced in commit bac6cf8 in version 0.6.12 (released July 2021) and allows a local or physically present attacker to bypass authentication entirely in affected PAM stack configurations. The vulnerability was discovered by SUSE security engineers Matthias Gerstner and Marcus Rückert in October 2024, with coordinated disclosure completed and upstream fix released on February 6, 2025. It carries a CVSS v3.1 base score of 6.7 (Medium) per NVD, though the GitHub Security Advisory rates it 9.3 (Critical) under a broader scope assessment (GitHub Advisory, oss-security).

Technical details

The root cause is classified as CWE-393 (Return of Wrong Status Code). In pam_pkcs11 version 0.6.12, commit bac6cf8 changed the default error return value in pam_sm_authenticate() from PAM_CRED_INSUFFICIENT to PAM_IGNORE when no login_token_name is set (i.e., during initial login). This affects a large number of error exit paths — including crypto_init() failure, PKCS#11 module load failure, missing smartcard, session open failure, certificate list retrieval failure, and many others. When PAM_IGNORE is returned by a required PAM module, the PAM library treats the module's result as non-decisive; if all remaining modules on the stack are non-authenticating utility modules (e.g., pam_shells, pam_env, pam_gnome_keyring) that return PAM_SUCCESS, the overall authentication result becomes PAM_SUCCESS — granting access without valid credentials. Only two code paths (pkcs11_login() failure and verify_signature() failure) correctly return PAM_AUTH_ERR (oss-security, GitHub Advisory).

Impact

Successful exploitation allows a local or physically present attacker to completely bypass smartcard-based authentication and gain unauthorized access to a Linux desktop or system session without providing any credentials. The primary attack scenario involves inserting an arbitrary or mismatched smartcard (or YubiKey) into a reader on a system using GDM with the gdm-smartcard PAM stack, causing pam_pkcs11 to fail and return PAM_IGNORE, after which utility modules supply a PAM_SUCCESS result. This results in full confidentiality and integrity compromise of the authenticated user's session, with no availability impact. Affected distributions include openSUSE Tumbleweed (confirmed exploitable), and potentially Arch Linux, Exherbo Linux, and Linux from Scratch if pam_pkcs11 is installed and configured as the sole authentication module (oss-security, GitHub Advisory).

Exploitability

No public exploit code or exploit kit has been identified for this vulnerability. The EPSS score is very low at 0.013%, and it is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. However, the vulnerability is practically exploitable by any physically present attacker on an affected system — simply inserting an arbitrary or invalid smartcard into a reader is sufficient to trigger the PAM_IGNORE return path and bypass authentication. No threat actor attribution has been reported. The vulnerability has been detected by Nessus (plugin 216206) and Qualys (IDs 6017635, 6021824) (oss-security, GitHub Advisory).

Exploitation steps

  1. Identify a vulnerable target: Locate a Linux system running pam_pkcs11 version 0.6.12 with GDM as the display manager and smartcard authentication enabled (e.g., openSUSE Tumbleweed with default configuration). Confirm that the gdm-smartcard PAM stack uses pam_pkcs11 as the sole authenticating module with the required control setting.
  2. Trigger smartcard detection: Insert any arbitrary, mismatched, or invalid smartcard (or a YubiKey, which GDM 3 may treat as a smartcard due to a GDM bug) into a USB or smartcard reader attached to the target system. GDM will detect the device and switch into smartcard authentication mode.
  3. Initiate login: At the GDM login screen (now in smartcard mode), enter a valid username. The gdm-smartcard PAM stack is invoked, which calls pam_pkcs11.
  4. Trigger PAM_IGNORE: The inserted invalid/mismatched card causes pam_pkcs11 to fail at an early stage (e.g., crypto_init() failure, PKCS#11 module initialization failure, or certificate mismatch), causing pam_sm_authenticate() to return PAM_IGNORE instead of an error code.
  5. Authentication bypass: Because PAM_IGNORE is returned by the required pam_pkcs11 module, the PAM library ignores its result. The remaining utility modules on the stack (e.g., pam_shells, pam_env, pam_gnome_keyring) return PAM_SUCCESS, making the overall authentication result PAM_SUCCESS. Login succeeds without any valid credential being provided (oss-security, GitHub Advisory).

Indicators of compromise

  • Logs: System authentication logs (/var/log/auth.log or journalctl) showing a pam_pkcs11 log entry "Failed to initialize crypto" or similar PKCS#11 error immediately followed by a successful GDM login for a user.
  • Logs: PAM log entries showing pam_pkcs11 returning without PAM_AUTH_ERR or PAM_CRED_INSUFFICIENT during a login session where no valid smartcard certificate was presented.
  • Logs: GDM logs (/var/log/gdm/) indicating a switch to smartcard authentication mode coinciding with an unexpected successful login.
  • Physical/Hardware: Presence of an unrecognized or mismatched USB smartcard reader or YubiKey device connected to the system at the time of a suspicious login event.
  • System: Unexpected user session creation (e.g., new desktop session, shell process) for a user account without a corresponding successful smartcard PIN entry or certificate verification in the logs (oss-security).

Mitigation and workarounds

Patch: Upgrade pam_pkcs11 to version 0.6.13, released February 6, 2025, which restores the original card_only/wait_for_card behavior by changing erroneous PAM_IGNORE return values back to PAM_CRED_INSUFFICIENT (commit 2ecba68d40). Distribution-specific updates are available for Debian, Ubuntu (USN-7363-1), and openSUSE (pam_pkcs11 Releases, Ubuntu Advisory).

Workaround (if patching is not immediately possible): Replace the required control setting for pam_pkcs11 in the affected PAM stack (e.g., gdm-smartcard) with the following extended syntax:

auth [success=ok default=bad] pam_pkcs11.so wait_for_card card_only

This ensures that any return value other than PAM_SUCCESS — including PAM_IGNORE — is treated as a failure, preventing authentication bypass (oss-security).

Community reactions

The vulnerability was reported by SUSE security engineer Matthias Gerstner, who published a detailed technical blog post and oss-security disclosure on February 6, 2025. The linux-pam developer Dmitry V. Levin, consulted during the disclosure process, confirmed that the switch to PAM_IGNORE is problematic when end users are unaware of the behavioral change. The disclosure also highlighted a broader industry concern about PAM module authors misusing PAM_IGNORE in error paths, with a similar issue found in Yubico's pam_u2f module around the same time. Security news outlets including CyberSecurityNews and SecurityOnline.info covered the vulnerability, noting its potential to allow authentication bypass on Linux systems using X.509 certificate-based login (oss-security, GitHub Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

pam-pkcs11: 0.6.12-1+deb12u1

Fixed

sid

pam-pkcs11: 0.6.13-1

Fixed

trixie

pam-pkcs11: 0.6.13-1

Fixed

RHEL / CentOS

Unknown

Source: This report was generated using AI

Related Linux Debian vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-115825NONEN/A
  • Linux Debian logoLinux Debian
  • libplack-perl
NoYesOct 25, 2026
CVE-2026-115824NONEN/A
  • Linux Debian logoLinux Debian
  • starman
NoNoOct 25, 2026
CVE-2026-115823NONEN/A
  • Linux Debian logoLinux Debian
  • starman
NoNoOct 25, 2026
CVE-2026-115822NONEN/A
  • Linux Debian logoLinux Debian
  • starman
NoNoOct 25, 2026
CVE-2026-115817NONEN/A
  • Linux Debian logoLinux Debian
  • starman
NoNoOct 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management