Skip to main content

pam_usb CVE-2026-48983

| EUVDEUVD-2026-37936 MEDIUM
Time-of-check Time-of-use (TOCTOU) Race Condition (CWE-367)
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
    Obtain low-privilege local shell
  2. Delivery
    Identify or predict OTP pad directory path
  3. Exploit
    Place symlink at target path pointing to attacker-owned directory
  4. Execution
    Race pam_usb lstat()-to-mkdir() window during authentication event
  5. Persist
    Pad files written to attacker-controlled location
  6. Impact
    Read pre-written OTP values to predict or replay future authentication tokens

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture TOCTOU prevention
Exploitation Conditions

Exploitation requires a local account with code execution capability on a Linux system running pam_usb prior to 0.9.2 with one-time pad (OTP) authentication actively configured and in use - systems that deploy pam_usb without OTP pads are not affected via this path. The attacker must be able to predict or observe the target pad directory path and successfully place a symlink at that path in the narrow window between pam_usb's lstat() check and subsequent mkdir() call (CWE-367). CVSS AC:H reflects that winning this race requires precise timing and likely multiple attempts, making reliable exploitation non-trivial. Remote exploitation is impossible (AV:L - local vector only). CVSS PR:L confirms that a standard low-privilege local account is sufficient; no administrative rights are required. Exploitation is further constrained to moments when pam_usb is actively creating a new pad directory (e.g., first authentication with a new device or user), reducing opportunity windows. Systems where all local users are fully trusted carry negligible risk from this specific issue.

Impact

The CVSS 3.1 score of 5.8 (Medium) with vector AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:L is well-calibrated to the real-world threat. Local access (AV:L) and high attack complexity (AC:H) significantly constrain the exploitable population - only local, low-privilege users on systems running pam_usb with OTP enabled can attempt the attack, and winning the race requires precise timing and likely repeated attempts. The C:H rating is justified: exposure of OTP pad values enables prediction or pre-reading of future authentication tokens, which is a high-value outcome against a module whose entire purpose is authentication assurance. Integrity and availability impacts are limited (I:L/A:L) - pad files may be misdirected and authentication may be disrupted, but there is no arbitrary code execution path described. No EPSS score was provided in the input data, precluding probabilistic comparison. The CVE is absent from CISA KEV and no POC code has been identified, indicating no confirmed or widespread active exploitation. Practical risk is narrowly scoped to multi-user Linux environments where untrusted local accounts coexist with a pam_usb OTP deployment - a relatively rare production profile.

Exploit ScenarioDerived

A local attacker with a low-privilege shell identifies the expected filesystem path for a per-device or per-user OTP pad directory and places a symlink at that path pointing to a directory they own, before or during a pam_usb authentication event. If the symlink is in place when pam_usb calls lstat() (seeing the path as existing) and then calls mkdir() (which follows the symlink rather than creating a real directory), subsequent OTP pad files are written into the attacker's directory. The attacker then reads the pre-written pad values, enabling them to predict or replay future valid authentication tokens for the targeted user or device.

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

Symlink race condition in pam_usb prior to 0.9.2 allows a local attacker to redirect one-time pad files to an attacker-controlled directory, potentially exposing future OTP values before use and undermining hardware-based PAM authentication on Linux. The flaw is a classic TOCTOU pattern in per-device and per-user pad directory creation, fixed as part of a 12-issue security hardening release (0.9.2) triggered by an ongoing audit. No public exploit has been identified at time of analysis, and the vulnerability is not listed in CISA KEV; however, successful exploitation could permit authentication bypass by a local low-privilege user.

RemediationAI

Upgrade pam_usb to version 0.9.2, confirmed available at https://github.com/mcdope/pam_usb/releases/tag/0.9.2. This release is explicitly a Security Hardening Release addressing 12 distinct security findings, including the TOCTOU race in pad directory creation (PR #381) and the related O_EXCL gap in pad temp file creation (PR #380); the upgrade is strongly recommended by the maintainer and addresses issues beyond this CVE alone. If immediate upgrade is not feasible, restrict local user access so that only trusted accounts can execute code in the PAM authentication context - this eliminates the untrusted-local-actor prerequisite. Alternatively, disabling OTP pad functionality within pam_usb (if the deployment supports operating without OTP) removes the vulnerable code path entirely, though this degrades the authentication assurance the module provides. Filesystem-level controls such as sticky bits or restricted permissions on parent directories containing pad paths can raise the bar for symlink placement but do not eliminate the race window. Note that version 0.9.2 also patches XXE expansion, environment variable injection in PAM context, NULL dereference, integer overflow, and infinite-loop DoS issues - deferring the upgrade carries compounding risk.

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 module (cpe:2.3:a:mcdope:pam_usb:*:*:*:*:*:*:*:*) that provides hardware-backed authentication using removable USB media combined with one-time pads (OTP). The vulnerable code path implements a non-atomic check-then-act pattern: lstat() is called to test whether a pad directory exists, and mkdir() is called separately to create it if absent. CWE-367 (Time-of-check Time-of-use Race Condition) precisely describes this root cause - the two syscalls are not atomic, leaving a window during which a local attacker can insert a symlink at the target path pointing to an attacker-writable directory. The upstream fix (PR #381 in the 0.9.2 release) closes this race window in pad directory creation; PR #380 adds O_EXCL to pad temp file creation to eliminate a related concurrent-write race on the files themselves. The 0.9.2 release also added O_NOFOLLOW on evdev device opens (a parallel symlink defense) and a range of other hardening measures, indicating the TOCTOU class was a systemic concern in this codebase.

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:H/I:L/A:L
vuln.today AI 5.8 MEDIUM

Local-only TOCTOU race (AV:L, AC:H); low-privilege account sufficient (PR:L); OTP pad exposure yields high confidentiality impact with limited integrity and availability disruption.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:L
4.0 AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:L/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
High
Integrity
Low
Availability
Low

Lifecycle Timeline

2
Patch available
Jun 18, 2026 - 21:02 EUVD
CVE Published
Jun 18, 2026 - 19:07 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, a symlink race condition exists in per-device and per-user pad directory creation. pam_usb uses a check-then-act pattern: it calls lstat() to test for existence and then calls mkdir() separately to create the directory. A local attacker can win the race between these calls by replacing the target path with a symlink to a directory they control. If successful, one-time pad files may be written to an attacker-controlled location, potentially exposing future pad values before use or disrupting authentication. This issue has been fixed in version 0.9.2.

Threat Intelligence Overview

EPSS Score
0.1%
Top 100% 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.

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-48982 MEDIUM
5.8 Jun 18

Non-atomic one-time pad file creation in pam_usb prior to 0.9.2 exposes the core replay-prevention mechanism to a local

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