Skip to main content

pam_usb CVE-2026-47271

| EUVDEUVD-2026-32654 MEDIUM
NULL Pointer Dereference (CWE-476)
2026-05-27 GitHub_M
5.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Establish unprivileged local shell on target
  2. Delivery
    Launch memory-exhausting processes to induce OOM
  3. Exploit
    Wait for privileged user to trigger pam_usb authentication (sudo/login)
  4. Execution
    xmalloc/xstrdup returns NULL in NDEBUG build
  5. Persist
    NULL dereference crashes PAM module
  6. Impact
    Authentication denied; users locked out of sudo and login

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Null pointer safety, defensive checks
MITRE ATT&CK

1 technique across 1 tactic: Impact

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

Exploitation Conditions

Exploitation requires that pam_usb is explicitly configured in the system's PAM stack for one or more services (sudo, login, su) - this is a deliberate, non-default deployment requiring administrator intervention to enable. The installed binary must have been compiled with NDEBUG defined, which is the standard condition for packages distributed by Debian, Fedora, and Arch Linux but not for custom source builds without that flag. The attacker must have an existing local presence on the system (a shell or running process) capable of allocating sufficient memory to trigger an OOM condition in the pam_usb process at the moment of authentication (CVSS AC:H reflects this timing requirement). Exploitation is bounded to availability impact only - no code execution, privilege escalation, or data exposure is possible via this vulnerability. Systems with generous free memory at authentication time are not practically exploitable even if vulnerable in principle.

Impact

The CVSS 5.1 score with vector AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H accurately characterizes this as a local, high-complexity denial-of-service with no confidentiality or integrity impact. AC:H reflects the realistic constraint that an attacker must time memory exhaustion to coincide with an authentication event, requiring a local foothold and deliberate coordination. PR:N is technically correct - triggering memory pressure requires no elevated privileges - but the overall attack chain requires some form of local presence on the system, which is a meaningful barrier. No EPSS score was provided in the intelligence data; exploitation probability cannot be quantified beyond what the CVSS vector implies. The vulnerability is absent from the CISA KEV catalog, and no POC or active exploitation has been reported. The real-world risk is elevated in multi-user or server environments where losing sudo access during a critical incident has severe operational consequences. The insidious aspect is that distribution-packaged installations are silently affected while source-built installations without -DNDEBUG are not - administrators may be unaware their packaged binary lacks the guard. No conflicting signals are present in the provided data.

Exploit ScenarioDerived

An unprivileged local user on a multi-user Linux system launches a memory-intensive process (e.g., repeatedly allocating large arrays) immediately before a privileged administrator attempts to authenticate via sudo during an incident response. With system memory exhausted, pam_usb's xmalloc() or xstrdup() returns NULL; because the NDEBUG-compiled binary contains no OOM guard, the caller immediately dereferences NULL, crashing the PAM module and causing sudo to report authentication failure. The administrator is locked out for the duration of the crash, potentially impeding emergency response.

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

pam_usb prior to 0.9.0 crashes under memory pressure due to assert()-based OOM guards in src/mem.c that are silently stripped by standard distribution build flags, enabling a local denial-of-service against authentication subsystems. Any allocation failure in xmalloc(), xrealloc(), or xstrdup() returns NULL, which every caller then dereferences unconditionally - the intended abort-before-dereference guarantee exists only in debug builds, not in Debian, Fedora, or Arch Linux packages that define -DNDEBUG via CFLAGS. A local attacker who can induce memory pressure at authentication time causes the PAM module to crash, locking all users out of sudo and login for the duration of the crash. No public exploit has been identified at time of analysis and the vulnerability is not listed in the CISA KEV catalog.

RemediationAI

The primary fix is to upgrade to pam_usb 0.9.0, which replaces assert()-based OOM guards in src/mem.c with explicit NULL checks followed by unconditional abort() calls, ensuring the guard is present in all build configurations regardless of NDEBUG. The upstream fix commit is at https://github.com/mcdope/pam_usb/commit/d003e551b794a9e3774ff4720830fb7aadaa48bd. For systems that cannot upgrade immediately, an interim compensating control is to rebuild pam_usb from source omitting -DNDEBUG from CFLAGS, which restores the assert() behavior - but this requires managing custom packages outside the distribution's update path and may be overwritten on the next OS-level package update. A second partial mitigation is to ensure the system has sufficient free memory headroom during authentication windows by limiting concurrent memory-intensive workloads, though this is not a reliable or enforceable control. Distribution maintainers for Debian, Fedora, and Arch Linux should be notified to rebuild and ship updated packages from 0.9.0.

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 provides hardware-based authentication via removable USB media. Its memory allocation wrappers in src/mem.c - xmalloc(), xrealloc(), and xstrdup() - used assert(data != NULL) as their sole out-of-memory guard. The C standard (ISO/IEC 9899) specifies that the entire assert() expression, including its side effects, is elided when the translation unit is compiled with NDEBUG defined. Distribution-level packaging for Debian, Fedora, and Arch Linux routinely inject -DNDEBUG into CFLAGS for release builds, silently removing these guards from the compiled binary. With the guard absent, any failed heap allocation propagates a NULL return value that is immediately dereferenced by callers - a textbook CWE-476 (NULL Pointer Dereference) condition. Because pam_usb runs within the PAM stack loaded by privileged binaries such as sudo and login, a module crash translates directly into authentication failure at the OS level.

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

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

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

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

DescriptionCVE.org

pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.9.0, src/mem.c implemented out-of-memory guards for xmalloc(), xrealloc(), and xstrdup() using assert(data != NULL). The C standard specifies that all assert() expressions are compiled out when NDEBUG is defined at build time. NDEBUG is commonly defined in release and packaging builds (Debian, Fedora, Arch package flags all define it via -DNDEBUG in CFLAGS). With the guard removed, xmalloc/xrealloc/xstrdup silently return NULL on allocation failure. Every caller in the codebase dereferences the return value without a NULL check -- this is the intended design, as the guard was supposed to abort before the dereference. With the guard gone, any allocation failure causes a NULL pointer dereference, crashing the PAM module. A crash in a PAM module loaded by sudo or login causes authentication to fail for the duration of the crash, creating a local denial-of-service condition. An attacker who can induce memory pressure at authentication time can lock all users out of sudo and login. This vulnerability is fixed in 0.9.0.

Threat Intelligence Overview

EPSS Score
0.0%
Top 96% 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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

A null pointer dereference occurs when a program attempts to access memory through a pointer that has been set to NULL (address 0x0).

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy