CVE-2026-48982: pam_usb One-Time Pad Race Condition Vulnerability
pam_usb is a Linux authentication system that uses removable media (like USB devices) as a hardware security token. The vulnerability exists in how pam_usb creates temporary files when updating its one-time pad—a counter that prevents the same authentication credential from being reused. The flaw: the temporary file is created without atomic guarantees, meaning two processes updating the pad simultaneously could both write to the file, with the second write erasing the first. This race condition could cause authentication failures or, in a worst-case scenario, create a window where an attacker could replay a previously-used credential. The issue is resolved in version 0.9.2.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 5.8 MEDIUM · CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L
- Weaknesses (CWE)
- CWE-362
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-18 / 2026-06-22
NVD description (verbatim)
pam_usb provides hardware authentication for Linux using ordinary removable media. In versions prior to 0.9.2, when updating a one-time pad file, a temporary file is created using open() without the O_EXCL flag. Without O_EXCL, the create operation is not atomic: two concurrent processes racing to update the same pad may both succeed in opening the file, with the second write silently overwriting the first. The one-time pad is the core replay-prevention mechanism of pam_usb. A successful race could result in the stored pad value diverging from what either process expected, potentially causing authentication failures or, in a precisely timed attack, creating a window for pad reuse. This issue has been fixed in version 0.9.2.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-48982 stems from improper file creation in pam_usb's one-time pad update mechanism. The vulnerable code uses open() without the O_EXCL flag when creating a temporary file, violating atomic file creation semantics. Under concurrent access—such as rapid authentication attempts or legitimate parallel processes—two threads or processes can both succeed in opening and writing to the same temporary file. The second write operation silently overwrites the first, corrupting the one-time pad state. Because the one-time pad is the primary defense against replay attacks, divergence between the stored pad and the expected value creates either authentication denial-of-service or, if an attacker can influence timing, a narrow window for credential reuse. The race condition is classified as CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization).
Business impact
Organizations relying on pam_usb for hardware-based authentication face two primary risks. First, legitimate users may experience intermittent authentication failures if concurrent authentication attempts trigger the race condition, degrading system availability. Second, if an attacker can trigger and win the race condition, they may be able to reuse a previously-captured one-time pad value to forge authentication, potentially gaining unauthorized access to systems. For environments where pam_usb is deployed as a primary or sole authentication mechanism, either risk—denial of service or credential compromise—could have significant operational and security consequences.
Affected systems
pam_usb versions prior to 0.9.2 are vulnerable. The vulnerability is specific to the one-time pad update code path, so it manifests primarily on systems where pam_usb authentication is actively in use and where concurrent authentication attempts are possible. Linux systems using pam_usb for multi-user authentication, shared workstations, or high-frequency authentication scenarios are at higher risk of triggering the race condition.
Exploitability
Exploitation requires local access (attack vector is local) and privilege level of at least the user attempting authentication, making this accessible to standard users rather than requiring root. However, winning the race condition intentionally is non-trivial—it requires precise timing and the ability to trigger concurrent updates to the one-time pad. Accidental triggering is more likely in high-concurrency environments. The CVSS score of 5.8 (MEDIUM) reflects the local-only attack vector, elevated complexity, and relatively narrow exploitation window, balanced against the potential for authentication bypass.
Remediation
Upgrade pam_usb to version 0.9.2 or later. Verify the upgrade by checking the installed version and reviewing the one-time pad file permissions and ownership to ensure they remain secure post-upgrade. For environments where an immediate upgrade is not feasible, consider temporarily restricting concurrent authentication attempts or reducing the number of simultaneous user sessions.
Patch guidance
Apply the pam_usb update to version 0.9.2 as distributed by the pam_usb project. Verify successful installation by running the installed pam_usb binary with the --version flag or checking package metadata. No special configuration changes are required post-patch; the fix is transparent to end users. Test authentication on at least one system before rolling out to production to confirm no local integration issues arise. If pam_usb is compiled from source, ensure you pull from a trusted repository and build version 0.9.2 or later.
Detection guidance
Review system logs and authentication logs for intermittent authentication failures or unusual authentication patterns that could indicate race condition triggering. Monitor /var/log/auth.log (or equivalent) for repeated failed authentication attempts from the same user in rapid succession, which may suggest concurrent pad-update collisions. On systems using pam_usb, periodically audit the version in use (e.g., via package manager queries) to identify instances still running versions prior to 0.9.2. If forensic investigation is needed, examine the one-time pad file itself for signs of corruption or divergence from expected state.
Why prioritize this
Although the CVSS score is MEDIUM, this vulnerability should be prioritized for patches in any environment actively using pam_usb because it directly undermines the authentication mechanism itself. The ability to either deny authentication or, under favorable conditions, forge credentials makes this a high-priority security issue despite its lower CVSS. Organizations should patch at the next available maintenance window; delay increases the window of exposure to both availability and integrity risks.
Risk score, explained
The CVSS 3.1 score of 5.8 (MEDIUM) reflects the following factors: local-only attack vector (low immediacy compared to network attacks), high attack complexity due to race-condition timing requirements (harder to exploit reliably), low required privileges (standard user can trigger), no user interaction needed, unchanged scope, and moderate impact (confidentiality: low, integrity: high, availability: low). The high integrity impact (credential bypass potential) is somewhat offset by the difficulty in reliably triggering the condition, resulting in a MEDIUM overall score. However, the security significance exceeds the numerical score due to the core nature of the vulnerability.
Frequently asked questions
Does this vulnerability allow remote attackers to compromise systems?
No. The vulnerability requires local access to the system and is triggered through local concurrent authentication processes. Remote attackers cannot exploit this directly; however, any local user can potentially trigger it.
What is a one-time pad in the context of pam_usb, and why does this vulnerability matter?
The one-time pad is a counter mechanism that changes with each successful authentication, preventing an attacker who captures one valid credential from reusing it repeatedly (replay attack prevention). If the pad becomes desynchronized due to the race condition, either authentication fails or an attacker may reuse old credentials during the desynchronization window.
Will upgrading to version 0.9.2 break existing configurations or require user re-enrollment?
No. The fix to pam_usb is internal to the file-creation mechanism and does not alter the user-facing authentication flow or configuration format. Existing one-time pads remain valid and no re-enrollment is necessary.
If I am not currently using pam_usb, should I be concerned?
No. This vulnerability is specific to pam_usb deployments. If your organization does not use pam_usb for authentication, this does not affect you. Review your authentication stack to confirm pam_usb is not in use.
This analysis is provided for educational and informational purposes to support security decision-making. While efforts have been made to ensure accuracy, SEC.co makes no warranty regarding the completeness or correctness of this information. Readers should verify all patch versions, affected product lists, and technical details against the official vendor advisories and CVE records before taking action. Exploitation scenarios described are provided to illustrate technical risk, not as instructions. Organizations should conduct their own risk assessment and testing before deploying patches in production environments. Source: NVD (public-domain), retrieved 2026-07-27. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2025-15546MEDIUMIptanus File Upload Plugin TOCTOU Race Condition Vulnerability
- CVE-2026-11145MEDIUMChrome Android Geolocation Race Condition Data Leak
- CVE-2026-11253MEDIUMChrome Permissions Flaw Allows Cross-Origin Data Leak
- CVE-2026-46187MEDIUMLinux RSI Driver Use-After-Free Vulnerability (CVSS 4.7)
- CVE-2026-46272MEDIUMLinux CoreSight TMC-ETR Race Condition DoS
- CVE-2026-46298MEDIUMLinux PAPR HVPIPE Race Condition Denial of Service
- CVE-2026-46693MEDIUMImageMagick Distributed Cache Race Condition & File Descriptor Hijacking
- CVE-2026-47741MEDIUMShopper Discount Over-Redemption Race Condition (MEDIUM)