Skip to main content

pam_usb CVE-2026-47273

| EUVDEUVD-2026-32652 MEDIUM
XML Injection (aka Blind XPath Injection) (CWE-91)
2026-05-27 GitHub_M
6.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Identify SSH target running pam_usb
  2. Delivery
    Craft PAM username with XPath predicate payload
  3. Exploit
    Submit authentication request to SSH daemon
  4. Execution
    pam_usb interpolates unsanitized username into XPath
  5. Persist
    Device-presence query evaluates to true
  6. Impact
    Authentication bypassed without USB token

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization XPath query parameterization
Exploitation Conditions

The target system must have pam_usb installed and explicitly configured in the PAM stack - this is never a default configuration on any major Linux distribution. For the network attack path reflected in the AV:N CVSS vector: pam_usb must appear in the PAM configuration for a network-accessible service such as SSH (/etc/pam.d/sshd) or similar; the attacker supplies a PAM username or the calling application provides a service name containing a single-quote character or XPath metacharacter. No authentication is required (PR:N per CVSS). High attack complexity (AC:H) applies: the attacker must know or successfully guess the XPath structure of the target's /etc/pamusb.conf to craft a predicate that causes the device-presence check to evaluate as true. For the secondary device-identifier injection path: physical access to the target machine is required to attach a USB device whose serial, model, or vendor fields contain injected XPath predicates - this path is not captured in the AV:N CVSS scoring. Exploitation is scoped to the pam_usb authentication decision only and does not directly affect other PAM modules in the stack.

Impact

The CVSS 3.1 base score of 6.5 with vector AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N reflects a network-reachable, unauthenticated attack path with high integrity impact but high attack complexity. The High integrity impact (I:H) is disproportionately severe relative to the overall score: successful exploitation nullifies the hardware authentication control pam_usb provides, allowing a remote attacker to authenticate without physical possession of the USB token. The High attack complexity (AC:H) reflects the need to craft a working XPath predicate against the specific structure of the target's /etc/pamusb.conf without direct access to the file. No EPSS data was provided in the intelligence sources, preventing probabilistic exploitation assessment. There is no CISA KEV listing, and no standalone public exploit tool has been identified - the available test cases in the patch PR demonstrate injection payloads but are not packaged as an exploit. pam_usb is a niche, non-default module not installed on any major Linux distribution out of the box, which meaningfully reduces the exposed population. However, for any system relying on pam_usb as a second factor for privileged access (SSH, sudo), this vulnerability negates that control entirely and warrants priority remediation despite the moderate composite score.

Exploit ScenarioDerived

An attacker targeting a Linux server where pam_usb is configured in the SSH PAM stack submits an authentication request with a crafted username such as ' or @id='targetuser to the SSH daemon. The pam_usb module incorporates this unsanitized value directly into an XPath predicate querying /etc/pamusb.conf, causing the device-presence check to evaluate to true even though no registered USB device is connected to the server. The attacker clears the hardware authentication gate and proceeds with login under the targeted account without ever possessing the USB token.

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

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

Alert me

AnalysisAIv1 – May 27, 2026

XPath injection in pam_usb prior to 0.9.0 allows unauthenticated remote attackers to manipulate device-verification queries against /etc/pamusb.conf, potentially bypassing USB hardware authentication entirely. PAM usernames and service names submitted through network-facing services such as SSH are passed unsanitized into XPath expressions; injecting predicates such as ' or @id='victim causes the device-presence check to evaluate as true without the USB token physically present. No public exploit identified at time of analysis, though the GitHub security advisory, fix commit, and injection test cases demonstrating the technique are publicly available.

RemediationAI

Upgrade to pam_usb 0.9.0, the vendor-released patch for this vulnerability, confirmed in the CVE description and GitHub Security Advisory GHSA-vfj3-5h5v-6g93. The fix is implemented in commit 721fed08a3596cb5b4671ad702f8fdc12dcc7420 (https://github.com/mcdope/pam_usb/commit/721fed08a3596cb5b4671ad702f8fdc12dcc7420) via pull request #311 (https://github.com/mcdope/pam_usb/pull/311). If an immediate upgrade is not feasible, remove pam_usb from the PAM configuration of all network-facing services (e.g., delete or comment out the pam_usb line in /etc/pam.d/sshd) to eliminate the network attack vector (AV:N) - this trade-off disables hardware authentication for remote logins but contains risk to local, physically-attended sessions only. Do not attempt to sanitize PAM usernames at the application or SSH layer as a substitute for patching: device-supplied identifier injection via a physically-attached USB device with crafted serial, model, or vendor fields remains unmitigated by any network-layer control.

Affected VersionsENISA

pam_usb < 0.9.0

Affected Packages

euvd pam_usb fix: 0.9.0

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 (CPE: cpe:2.3:a:mcdope:pam_usb:*:*:*:*:*:*:*:*) is a Linux PAM module that queries /etc/pamusb.conf using libxml2 XPath expressions to verify that a registered USB device is present for a given user and service. Three identifier classes were interpolated directly into XPath predicates without sanitization prior to 0.9.0: the PAM username (supplied by the authenticating client or remote service), the service name (e.g., 'login', 'sudo'), and USB device-supplied fields including serial, model, and vendor strings read directly from the plugged-in device. CWE-91 (XPath Injection) is the root cause - single-quote characters and other XPath metacharacters in these identifiers allow escape from the intended query context and injection of arbitrary predicates into the XML document query. The fix in commit 721fed08 introduces the pusb_conf_xpath_id_is_safe() function, which rejects any identifier containing a single quote (0x27) or ASCII control characters (values below 0x20) before any XPath expression is constructed. Validation is applied to all three identifier classes: username, service name, and device ID.

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

Primary rating from Vendor (GitHub_M) · only source for this CVE.

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

2
Patch available
May 27, 2026 - 22:04 EUVD
CVE Published
May 27, 2026 - 20:03 nvd
MEDIUM 6.5

DescriptionCVE.org

pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.9.0, pam_usb builds XPath expressions from user-supplied identifiers (PAM username, service name) and device-supplied identifiers (USB device serial, model, vendor) to query /etc/pamusb.conf. These identifiers were not validated for XPath metacharacters, allowing injection of arbitrary XPath predicates. This vulnerability is fixed in 0.9.0.

Threat Intelligence Overview

EPSS Score
0.0%
Top 86% 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.0%
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

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