Skip to main content

pam_usb CVE-2026-48065

| EUVDEUVD-2026-32649 MEDIUM
Heap-based Buffer Overflow (CWE-122)
2026-05-27 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
    Obtain high-privilege local access
  2. Delivery
    Write crafted config with large n_devices
  3. Exploit
    Trigger pam_usb config parsing (login attempt)
  4. Execution
    Integer overflow wraps allocation size
  5. Persist
    Heap buffer overflow via out-of-bounds array write
  6. Impact
    Achieve arbitrary code execution or memory corruption impact

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

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

Exploitation Conditions

Exploitation requires all of the following: (1) the target system must be a 32-bit Linux build (armv7l or i686 - 64-bit systems are architecturally immune); (2) pam_usb must be installed and configured as an active PAM module; (3) the attacker must have high privileges sufficient to write to or inject content into the pam_usb configuration file, as confirmed by CVSS PR:H - unauthenticated or low-privilege exploitation is not possible per the CVSS vector; (4) pam_usb authentication must be triggered (e.g., a login attempt) after the malicious configuration is in place to cause config parsing. Exploitation is limited by: the 32-bit architecture requirement (excludes the majority of modern server and desktop deployments), the high-privilege prerequisite (PR:H per CVSS vector), and local-only attack vector (AV:L - no remote exploitation path).

Impact

The CVSS 3.1 vector AV:L/AC:L/PR:H/UI:N/S:U yields a score of 6.7 (Medium), reflecting that exploitation requires both local system access and high privileges - the attacker must already be able to write or influence the pam_usb configuration file, which is typically root-owned. While the impact triad (C:H/I:H/A:H) signals complete host compromise upon successful exploitation, the PR:H prerequisite dramatically limits the realistic attacker population: an entity already possessing root-level write access to /etc/pam_usb.conf has likely already achieved their objective. The constraint to 32-bit architectures (armv7l, i686) further narrows exposure to embedded Linux deployments, older IoT hardware, or deliberately 32-bit build environments. No EPSS score was provided in the input data, so probabilistic exploitation likelihood cannot be quantified. This vulnerability is not listed in the CISA KEV catalog and no POC has been reported, consistent with its niche exploitation prerequisites. Practically, this is a low-priority finding for most deployments unless pam_usb is running on 32-bit systems where the configuration file is writable by partially-trusted processes or multi-tenant admin accounts below root.

Exploit ScenarioDerived

A local attacker who has obtained high-privilege access (e.g., root or a process with write access to /etc/pam_usb.conf) on a 32-bit Linux system (armv7l or i686) modifies the configuration file to declare an extremely large number of USB devices. When pam_usb next evaluates the config via libxml2 XPath, n_devices * sizeof(t_pusb_device) overflows the 32-bit size_t, causing xmalloc() to allocate a tiny heap buffer; subsequent device array population then writes far beyond the allocation boundary, corrupting adjacent heap structures. No public POC has been identified at time of analysis, but the overflow mechanics are straightforward for any analyst familiar with 32-bit integer arithmetic and heap exploitation on Linux.

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

Heap buffer overflow in pam_usb prior to 0.9.1 allows a local attacker with high privileges to corrupt heap memory on 32-bit Linux platforms (armv7l, i686) by supplying a crafted configuration file with an excessive device count. The root cause is an unchecked integer multiplication in src/conf.c where n_devices * sizeof(t_pusb_device) wraps around size_t on 32-bit targets, causing xmalloc() to receive a drastically undersized allocation that is silently accepted, enabling out-of-bounds writes into heap memory. No public exploit code has been identified at time of analysis, and this vulnerability is not listed in the CISA KEV catalog; however, successful exploitation yields full confidentiality, integrity, and availability impact on the affected host.

RemediationAI

Upgrade pam_usb to version 0.9.1, which is the vendor-confirmed patched release per the GitHub security advisory at https://github.com/mcdope/pam_usb/security/advisories/GHSA-24mw-m2vf-36vp. This fix is expected to introduce an upper-bound check on n_devices before the heap allocation multiplication in src/conf.c, preventing the integer wrap-around. For environments that cannot immediately upgrade, the most effective compensating control is to ensure the pam_usb configuration file (typically /etc/pam_usb.conf) is writable only by root (mode 0600 or 0640, owned by root:root), which prevents any non-root actor from supplying a malicious device count - trade-off is negligible since this is the expected secure default. Additionally, consider restricting pam_usb deployment exclusively to 64-bit architectures where the size_t overflow condition cannot be triggered, eliminating the vulnerability entirely without a code change. Disabling pam_usb on 32-bit hosts until patched is the most conservative option if the authentication mechanism is not operationally critical.

Affected VersionsENISA

pam_usb < 0.9.1

Affected Packages

euvd pam_usb fix: 0.9.1

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 PAM module that authenticates users via removable USB media, reading its configuration from an XML file parsed using libxml2 XPath queries. The vulnerable code resides in src/conf.c, where the integer n_devices - derived from the XPath-evaluated count of device entries in the config - is multiplied by sizeof(t_pusb_device) to compute a heap allocation size. On 32-bit architectures (armv7l and i686, both explicitly listed in the project Makefile), the type size_t is 32 bits wide, meaning sufficiently large n_devices values cause the multiplication result to wrap around to a small integer. xmalloc() calls abort() only on NULL return; a small-but-valid pointer is returned and accepted without error. Subsequent array writes then overflow the undersized heap buffer. This is a classic CWE-122 (Heap-based Buffer Overflow) triggered by an integer overflow precondition (related to CWE-190), and is exclusively reproducible on 32-bit targets due to the size_t width constraint. The CPE cpe:2.3:a:mcdope:pam_usb:*:*:*:*:*:*:*:* indicates all releases prior to the fix are affected.

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

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

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

2
Patch available
May 27, 2026 - 22:04 EUVD
CVE Published
May 27, 2026 - 19:58 nvd
MEDIUM 6.7

DescriptionCVE.org

pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.9.1, src/conf.c allocates heap memory proportional to n_devices, a count derived from libxml2 XPath evaluation of the config file, without first enforcing an upper bound. On 32-bit targets (armv7l, i686 -- both listed in the project Makefile), the multiplication n_devices * sizeof(t_pusb_device) wraps around size_t, causing xmalloc() to receive a very small size. Because xmalloc() only calls abort() on NULL return, a small-but-non-NULL allocation is accepted, and subsequent array writes overflow the heap. This vulnerability is fixed in 0.9.1.

Threat Intelligence Overview

EPSS Score
0.0%
Top 95% 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
Total

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

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

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