Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify SSH target running pam_usb
-
DeliveryCraft PAM username with XPath predicate payload
-
ExploitSubmit authentication request to SSH daemon
-
Executionpam_usb interpolates unsanitized username into XPath
-
PersistDevice-presence query evaluates to true
-
ImpactAuthentication 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 |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
Lifecycle Timeline
2DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Authentication bypass in pam_usb before 0.9.1 allows remote unauthenticated attackers to reach the USB hardware-authenti
pam_usb versions 0.8.0 through 0.9.2 fail to recognize compressed-notation IPv6 addresses when evaluating the optional d
The deny_remote safeguard in pam_usb fails open on link-local IPv6 sessions, causing a remote login to be classified as
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
Authentication bypass in pam_usb prior to 0.9.0 lets a local user defeat the USB hardware-authentication factor by delet
XXE injection in pam_usb prior to 0.9.2 enables an attacker with write access to the root-owned configuration file to tr
Heap buffer overflow in pam_usb prior to 0.9.1 allows a local attacker with high privileges to corrupt heap memory on 32
Environment variable injection in pam_usb prior to version 0.9.2 allows a local authenticated user to bypass hardware US
PATH hijacking in pam_usb helper tools prior to version 0.9.0 allows a local low-privileged attacker who can manipulate
Non-atomic one-time pad file creation in pam_usb prior to 0.9.2 exposes the core replay-prevention mechanism to a local
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
Concurrent PAM invocations in pam_usb prior to 0.9.1 expose a process-wide static pointer race condition in src/log.c, w
EUVD-2026-32652
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB