Skip to main content

pam_usb CVE-2026-48981

| EUVDEUVD-2026-37934 MEDIUM
Improper Restriction of XML External Entity Reference (CWE-611)
2026-06-18 GitHub_M
6.7
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Gain root write access to target system
  2. Delivery
    Inject XXE payload into /etc/pam_usb.conf
  3. Exploit
    Wait for authentication event via sudo or su
  4. Execution
    pam_usb.so loads and parses crafted XML
  5. Persist
    libxml2 resolves external entity reference
  6. Impact
    Exfiltrate local file contents or trigger outbound network beacon

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A02:2025 - Security Misconfiguration
ASVS 5.0
V13 - Configuration XML external entity prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Collection

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

Exploitation Conditions

Exploitation requires prior write access to /etc/pam_usb.conf, which is root-owned; gaining this access is itself a high-privilege prerequisite (PR:H). The configuration file must contain crafted XML external entity declarations - this is not a condition that arises organically and requires deliberate attacker action. pam_usb must be active in the PAM stack for at least one setuid service (sudo, su) on the target system for the XXE to execute in a privileged context. The attack is triggered passively when any user invokes an authentication event through an affected PAM service - the attacker does not need to interact with the system after planting the payload. Exploitation is limited by: (1) the requirement to first compromise root write access, (2) high attack complexity (AC:H) due to the multi-step setup, and (3) the need for pam_usb to be deployed and active - this is not a default Linux PAM configuration.

Impact

The CVSS 3.1 score of 6.7 (AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:L/A:L) accurately reflects the constrained exploitation path: an attacker must already possess root-level write access to pam_usb.conf before the XXE becomes exploitable, which limits opportunistic exploitation significantly. No EPSS score was provided in the input data, and this CVE does not appear in CISA KEV, reinforcing that no active exploitation has been confirmed. No public proof-of-concept has been identified. The S:C (scope change) metric is the most consequential signal here - because pam_usb.so executes inside sudo and su processes, any XXE-triggered file read or network connection happens in a privileged context, making this a meaningful defense-in-depth failure even if primary exploitation is gated behind root access. Real-world priority is moderate: organizations running pam_usb should patch promptly, but this does not represent an immediately weaponizable remote attack surface.

Exploit ScenarioDerived

An attacker who has achieved root-level access to a system (through a separate vulnerability or credential theft) modifies /etc/pam_usb.conf to embed an XML external entity declaration referencing a sensitive local file such as /etc/shadow or an attacker-controlled remote URL. The next time any user invokes sudo or su, pam_usb.so is loaded into the privileged process, xmlReadFile() parses the crafted config, and libxml2 resolves the external entity - either reading the target file into memory (potentially loggable via error output or side channels) or initiating an outbound DNS/HTTP request that exfiltrates data to the attacker. No public proof-of-concept has been identified, but the attack primitive is well-understood given the maturity of XXE exploitation techniques against libxml2.

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

XXE injection in pam_usb prior to 0.9.2 enables an attacker with write access to the root-owned configuration file to trigger unauthorized outbound network connections or local file reads during XML parsing, executing within privileged setuid contexts (sudo, su). The vulnerability stems from libxml2's xmlReadFile() being called with flags=0, leaving external entity processing enabled by default - a configuration-time oversight rather than a runtime input flaw. No public exploit identified at time of analysis, but the scope change (S:C in CVSS) reflects that exploitation occurs inside processes running with elevated privileges, amplifying the potential impact of any upstream compromise that enables config tampering.

RemediationAI

Upgrade to pam_usb 0.9.2, which resolves the XXE issue by passing explicit libxml2 parser flags to disable external entity expansion in xmlReadFile() (PR #385). The release is available at https://github.com/mcdope/pam_usb/releases/tag/0.9.2. As a compensating control prior to patching, restrict write permissions on pam_usb.conf to the absolute minimum (root:root, mode 0600) and audit for unexpected modifications using file integrity monitoring - note that this does not eliminate the vulnerability but removes any non-root path to config tampering. Additionally, consider temporarily removing pam_usb from the PAM stack for high-risk services (sudo, su) until patching is complete; the trade-off is loss of hardware authentication for those services during the interim period.

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 (CPE: cpe:2.3:a:mcdope:pam_usb:*:*:*:*:*:*:*:*) is a Linux PAM module that authenticates users against removable USB devices, parsing its configuration via libxml2's xmlReadFile(). CWE-611 (Improper Restriction of XML External Entity Reference) is the root cause: by passing flags=0, the caller implicitly enables libxml2's default behavior of resolving external entity declarations embedded in XML, including file:// and network-based URIs. Since pam_usb.so is loaded by setuid binaries such as sudo and su, any XML parsing side-effects - outbound HTTP/DNS requests, local file reads - occur in the security context of those privileged processes. The fix (PR #385 in the 0.9.2 release) passes explicit parser flags to xmlReadFile() to disable XXE resolution, consistent with the defense-in-depth hardening theme of the 0.9.2 release, which addressed 12 separate security findings.

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

Root write access to config mandates PR:H and AV:L; AC:H for multi-step prerequisite; S:C because pam_usb.so executes inside setuid sudo/su processes.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

2
Patch available
Jun 18, 2026 - 21:02 EUVD
CVE Published
Jun 18, 2026 - 18:55 cve.org
MEDIUM 6.7

DescriptionCVE.org

pam_usb provides hardware authentication for Linux using ordinary removable media. In versions prior to 0.9.2, pam_usb calls xmlReadFile() with flags=0 when loading the configuration file, allowing libxml2 to process external entity references (XXE), potentially making outbound network connections or local file reads at XML parse time from the context of the authenticating process. The vulnerability requires the configuration file to contain crafted XML entity references. Since pam_usb.conf is root-owned, direct exploitation requires prior write access to the config, but the defence-in-depth impact is significant given that pam_usb.so runs in setuid contexts (sudo, su). This issue has been fixed in version 0.9.2.

Threat Intelligence Overview

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

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

Attack Technique

XML External Entity (XXE) attacks exploit XML parsers that process Document Type Definitions (DTDs) without proper restrictions.

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