Skip to main content

pam_usb CVE-2026-48982

| EUVDEUVD-2026-37935 MEDIUM
Race Condition (CWE-362)
2026-06-18 GitHub_M
5.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain local low-privilege shell
  2. Delivery
    Script concurrent PAM authentication sessions
  3. Exploit
    Race open() call on OTP pad temp file
  4. Execution
    Second write overwrites first pad update
  5. Persist
    Stored pad diverges to previously observed value
  6. Impact
    Present replayed USB token to authenticate

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Concurrency control, locking
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires all of the following: (1) a local account on the target Linux system with at least low-privilege access (PR:L per the provided CVSS vector); (2) pam_usb actively configured as a PAM module for a service on that system (SSH, sudo, console login, etc.); (3) the attacker's ability to initiate two or more concurrent authentication or pad-update events simultaneously - for example, by scripting parallel login attempts - to open the race window; and (4) precise timing to win the race (AC:H), requiring repeated attempts and favorable OS scheduler behavior. What limits exploitation: the attack is strictly local (AV:L - remote unauthenticated exploitation is not possible), the race must be won with high precision making reliable exploitation difficult, and the attacker must already hold a valid local account. Systems where pam_usb is not installed or where concurrent authentication is impossible (e.g., single-threaded PAM service with strict session limits) are not exposed.

Impact

The CVSS 3.1 vector AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L yields a score of 5.8, which accurately reflects the threat model: local-only access (AV:L) and high attack complexity (AC:H) substantially constrain exploitability, but Integrity:High is justified because a successful race undermines the entire replay-prevention layer of the authentication system. Confidentiality:Low and Availability:Low are consistent with incidental pad state exposure and potential authentication denial-of-service, respectively. No EPSS score was supplied in the input and cannot be assessed; absence of a KEV listing and the AC:H constraint together suggest this has not been opportunistically exploited at scale. Real-world risk is moderate: exploitation requires a local account capable of initiating concurrent authentication sessions, limiting the attacker population to insiders or already-compromised hosts. However, in environments where pam_usb serves as a second factor for privileged access (sudo, root login), a successful attack silently erodes that security layer without generating obvious alerts. Organizations using pam_usb in high-privilege workflows should treat this as high priority despite the mid-range CVSS score.

Exploit ScenarioDerived

A local attacker with a low-privilege account on a Linux system using pam_usb scripts two simultaneous authentication attempts against the same PAM service, timing them to collide during the OTP pad temp file write. If the race is won, the second open() call overwrites the first process's pad update, leaving the on-disk value mismatched from both processes' expectations; in a precisely engineered case, the attacker arranges for the resulting stored pad to match a previously captured pad value, then presents the corresponding USB token to authenticate with a replayed credential. No public proof-of-concept has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 18, 2026

Non-atomic one-time pad file creation in pam_usb prior to 0.9.2 exposes the core replay-prevention mechanism to a local race condition (CWE-362), allowing a precisely timed concurrent write to corrupt or reuse the stored OTP pad state. Systems running pam_usb as a PAM module for SSH, sudo, or login are affected on all versions before 0.9.2; successful exploitation could silently degrade hardware authentication integrity, creating a window for USB token replay attacks. No public exploit or CISA KEV listing has been identified at time of analysis; vendor-released patch 0.9.2 resolves this and 11 additional security findings.

RemediationAI

Upgrade pam_usb to version 0.9.2 immediately; this release adds O_EXCL to the pad temp file creation call (PR #380) to atomize the operation and eliminate the race window. Version 0.9.2 is a broad security hardening release that simultaneously addresses 11 additional findings - including a TOCTOU race in pad directory creation (PR #381), symlink attack on the event device node, XXE in xmlReadFile, environment variable injection via getenv() in PAM context, and NULL dereference - making the upgrade strongly advisable beyond this single CVE. The release is available at https://github.com/mcdope/pam_usb/releases/tag/0.9.2. If immediate upgrade is not possible, restrict local shell access to the authenticating system so only highly trusted accounts can initiate concurrent PAM sessions, reducing the race opportunity; note this is a partial compensating control that does not eliminate the window. There is no known configuration toggle to disable the vulnerable code path without patching.

Affected VersionsENISA

pam_usb < 0.9.2

Affected Packages

euvd pam_usb fix: 0.9.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pam_usb is a Linux PAM (Pluggable Authentication Module) that authenticates users via removable USB media, using a one-time pad (OTP) stored in a flat file to prevent replay of previously observed USB tokens. The flaw resides in the pad update routine, which called open() to create a temporary file without the O_EXCL flag. O_EXCL makes file creation atomic - it fails if the file already exists - so its absence leaves a TOCTOU (Time-of-Check-Time-of-Use) window where two concurrent processes can both successfully open and write the same temporary file. The second write silently overwrites the first, leaving the on-disk pad state inconsistent with what either process expects. CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization) precisely describes this root cause. The affected CPE is cpe:2.3:a:mcdope:pam_usb:*:*:*:*:*:*:*:*, covering all versions before 0.9.2. The fix, confirmed in release notes as PR #380, adds O_EXCL to the pad temp file creation call to restore atomicity.

Know when Pam Usb gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.8 MEDIUM
AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L
vuln.today AI 5.8 MEDIUM

Local-only race requiring a low-privilege account and precise timing drives AV:L, AC:H, PR:L; pad state corruption enabling replay justifies I:H with minor C and A impact.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L
4.0 AV:L/AC:H/AT:P/PR:L/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
Low

Lifecycle Timeline

2
Patch available
Jun 18, 2026 - 21:02 EUVD
CVE Published
Jun 18, 2026 - 19:01 cve.org
MEDIUM 5.8

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 99% exploitable
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

29
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +29
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Race conditions occur when multiple concurrent requests exploit the brief time gap between checking a condition and acting upon it (TOCTOU - Time of Check, Time of Use).

CVE-2026-48064 HIGH
8.1 May 27

Authentication bypass in pam_usb before 0.9.1 allows remote unauthenticated attackers to reach the USB hardware-authenti

CVE-2026-64669 HIGH
7.4 Nov 11

pam_usb versions 0.8.0 through 0.9.2 fail to recognize compressed-notation IPv6 addresses when evaluating the optional d

CVE-2026-64668 HIGH
7.4 Nov 11

The deny_remote safeguard in pam_usb fails open on link-local IPv6 sessions, causing a remote login to be classified as

CVE-2026-64666 HIGH
7.1 Nov 11

pam_usb through 0.9.2 can be pushed past its explicit XRDP deny rule by a local user who simply unsets the XRDP_SESSION

CVE-2026-47272 HIGH
7.1 May 27

Authentication bypass in pam_usb prior to 0.9.0 lets a local user defeat the USB hardware-authentication factor by delet

CVE-2026-48981 MEDIUM
6.7 Jun 18

XXE injection in pam_usb prior to 0.9.2 enables an attacker with write access to the root-owned configuration file to tr

CVE-2026-48065 MEDIUM
6.7 May 27

Heap buffer overflow in pam_usb prior to 0.9.1 allows a local attacker with high privileges to corrupt heap memory on 32

CVE-2026-47273 MEDIUM
6.5 May 27

XPath injection in pam_usb prior to 0.9.0 allows unauthenticated remote attackers to manipulate device-verification quer

CVE-2026-48980 MEDIUM
6.3 Jun 18

Environment variable injection in pam_usb prior to version 0.9.2 allows a local authenticated user to bypass hardware US

CVE-2026-47274 MEDIUM
6.3 May 27

PATH hijacking in pam_usb helper tools prior to version 0.9.0 allows a local low-privileged attacker who can manipulate

CVE-2026-48983 MEDIUM
5.8 Jun 18

Symlink race condition in pam_usb prior to 0.9.2 allows a local attacker to redirect one-time pad files to an attacker-c

CVE-2026-48066 MEDIUM
5.7 May 27

Concurrent PAM invocations in pam_usb prior to 0.9.1 expose a process-wide static pointer race condition in src/log.c, w

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy