Skip to main content

pam_usb EUVDEUVD-2026-37937

| CVE-2026-48980 MEDIUM
External Initialization of Trusted Variables or Data Stores (CWE-454)
2026-06-18 GitHub_M
6.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Gain local user account on target Linux system
  2. Delivery
    Set XRDP_SESSION/DISPLAY/TMUX env vars to attacker-chosen values
  3. Exploit
    Invoke sudo or su (setuid binary triggers PAM stack)
  4. Install
    pam_usb calls getenv() and receives injected values
  5. C2
    Session misclassified as remote or non-local by pam_usb logic
  6. Execute
    Hardware USB token check bypassed
  7. Impact
    Execute privileged commands without presenting USB device

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture External initialization of trusted vars
Exploitation Conditions

Exploitation requires three specific conditions: (1) pam_usb must be installed and configured in the PAM stack for a setuid binary - specifically sudo or su - on a Linux system; (2) the attacker must hold a local user account with permission to invoke that setuid binary (PR:L); and (3) the attacker must manipulate the process environment to set one or more of XRDP_SESSION, DISPLAY, or TMUX to values that cause pam_usb's session-type check to return an unexpected classification before the setuid binary executes. Exploitation is strictly local (AV:L) - remote unauthenticated attackers cannot reach this code path directly. Environments where pam_usb is not installed, or where it is configured only for login flows that do not involve setuid binaries, are not affected. The AC:H rating reflects the requirement for successful environment pre-loading prior to PAM execution, not a cryptographic or race-condition hurdle. Systems where sudo is further restricted by SELinux or AppArmor policies that clean the environment may have additional protection.

Impact

The NVD CVSS 3.1 score of 6.3 Medium (AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N) accurately captures the local-only attack surface and elevated attack complexity, but the High confidentiality and integrity sub-scores reflect that a successful exploitation achieves a complete authentication bypass - potentially granting root via sudo without a hardware token. This creates a meaningful gap between the headline score and real-world impact: for any organization using pam_usb as a compensating control for privileged access, the functional risk is closer to High because the entire security guarantee of the module is nullified. No EPSS score was present in the input data, so exploitation probability cannot be quantified from base-rate statistics. The vulnerability is not listed in CISA KEV and no POC has been identified, suggesting exploitation has not been observed at scale. However, the attack concept is low in novelty - environment variable manipulation before setuid invocation is a well-understood local privilege escalation technique - and any local user familiar with PAM internals could independently develop an exploit. The AC:H rating is warranted but should not create false comfort: the 'high complexity' here refers to pre-loading the environment correctly, not defeating a cryptographic mechanism.

Exploit ScenarioDerived

A local user with a standard account sets XRDP_SESSION=1 (or manipulates DISPLAY or TMUX) in their shell environment, then invokes sudo to execute a privileged command. When pam_usb runs inside the sudo setuid process, getenv() returns the attacker-controlled value, causing the module to classify the session as a remote desktop or non-local session and alter its hardware token enforcement logic, allowing the command to proceed without presenting the required USB device. No public POC has been identified at time of analysis, but the technique mirrors well-known environment variable poisoning patterns against setuid binaries.

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

Environment variable injection in pam_usb prior to version 0.9.2 allows a local authenticated user to bypass hardware USB token authentication by manipulating the XRDP_SESSION, DISPLAY, or TMUX environment variables before invoking setuid binaries such as sudo or su. Because the PAM module calls standard getenv() - which does not sanitize values in privileged contexts - attacker-controlled environment data is used to determine whether the current session is local or remote, potentially defeating the core purpose of hardware-enforced authentication. No public exploit has been identified at time of analysis and the vulnerability is not listed in CISA KEV, though the authentication bypass impact makes this a high-priority upgrade for any deployment relying on pam_usb for privileged command gating.

RemediationAI

Upgrade pam_usb to version 0.9.2 immediately; this release replaces getenv() with secure_getenv() in the PAM context (commit #384, issue #368), which is the direct fix for this vulnerability. The release is available at https://github.com/mcdope/pam_usb/releases/tag/0.9.2 and is described by the vendor as a strongly recommended upgrade. If immediate patching is blocked, a targeted compensating control is to restrict the set of local users permitted to invoke pam_usb-protected setuid binaries - for example, tightening the sudo ruleset to limit which accounts can trigger the vulnerable PAM stack - though this narrows rather than eliminates the attack surface. Additionally, administrators may audit PAM configuration to temporarily remove pam_usb from sudo and su stacks if hardware token enforcement is not strictly required for those paths, accepting the trade-off of reduced authentication assurance until the upgrade is applied. Note that version 0.9.2 also addresses 11 other security findings including TOCTOU races, XXE, symlink-following, and infinite-loop DoS; patching resolves all of these simultaneously.

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 Pluggable Authentication Module (PAM) that enforces hardware-based authentication using removable USB media, identified by CPE cpe:2.3:a:mcdope:pam_usb:*:*:*:*:*:*:*:*. The root cause is CWE-454 (Use of Externally-Controlled Input to Select Classes or Code): the module calls the POSIX standard getenv() to read XRDP_SESSION, DISPLAY, and TMUX in order to classify a session as local or remote and conditionally enforce hardware token requirements. The critical flaw is that getenv() returns attacker-supplied values from the inherited process environment when the module runs inside a setuid binary (sudo, su), because the POSIX standard does not require getenv() to be safe in privilege-escalation contexts. The correct POSIX substitute, secure_getenv() - implemented in the fix commit #384 - returns NULL whenever the real and effective UID/GID differ, blocking untrusted environment data from influencing security decisions. The 0.9.2 release addresses 12 independent security findings uncovered during an ongoing audit, indicating the vulnerability is part of a broader hardening effort rather than an isolated defect.

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 6.3 MEDIUM
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 6.3 MEDIUM

Local vector and low-privilege requirement reflect mandatory local account and environment manipulation before setuid execution; C:H/I:H capture full auth bypass enabling root access via sudo.

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

Lifecycle Timeline

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

DescriptionCVE.org

pam_usb provides hardware authentication for Linux using removable media. In versions prior to 0.9.2, getenv() environment variables XRDP_SESSION, DISPLAY and TMUX allow environment variable injection into local-check logic. These environment variables influence whether a current session is local or remote, and a PAM module that runs in the context of setuid binaries (sudo, su), getenv() returns attacker-controlled values whenever the process environment has been manipulated by a local user. This issue has been fixed in version 0.9.2.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% 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
Total

Priority Score

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

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

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-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-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