Skip to main content

pam_usb EUVDEUVD-2026-37922

| CVE-2026-48984 MEDIUM
Compiler Removal of Code to Clear Buffers (CWE-14)
2026-06-18 GitHub_M
4.7
CVSS 3.1 · Vendor: GitHub_M
Share

Severity by source

Vendor (GitHub_M) PRIMARY
4.7 MEDIUM
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
vuln.today AI
4.7 MEDIUM

Local access only; high complexity requires chaining with a use-after-free or heap inspection primitive; low privilege sufficient; confidentiality impact only via OTP pad recovery.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

3
Patch available
Jun 18, 2026 - 19:01 EUVD
Source Code Evidence Fetched
Jun 18, 2026 - 18:01 vuln.today
Analysis Generated
Jun 18, 2026 - 18:01 vuln.today

DescriptionCVE.org

pam_usb provides hardware authentication for Linux using ordinary removable media. In versions 0.9.1 and below, the xfree() memory release helper in calls free() without first zeroing the buffer contents, releasing heap-allocated buffers containing sensitive data - including one-time pad bytes read from disk - without clearing, leaving the sensitive content in freed heap memory until it happens to be overwritten by a subsequent allocation. On a system where a use-after-free condition exists, or where a heap inspection primitive becomes available, this could allow recovery of pad values or other authentication material from freed memory regions. This is a defence-in-depth requirement consistent with prior hardening work in this codebase (GHSA-vx6f-rrqr-j87c applied explicit_bzero to some pad paths; this issue generalises the pattern to the central deallocation helper).

AnalysisAI

Insecure deallocation in pam_usb 0.9.1 and below leaves sensitive authentication material - including one-time pad (OTP) bytes read from removable media - resident in freed heap memory because the xfree() helper calls free() without first zeroing the buffer. On any system where a secondary use-after-free condition or heap inspection primitive is present within the same pam_usb process, an attacker could recover pad values or other credential material from those freed regions, potentially undermining the hardware authentication guarantee pam_usb is designed to provide. This is a defense-in-depth hardening gap patched in 0.9.2; no confirmed active exploitation or public exploit code has been identified at time of analysis.

Technical ContextAI

pam_usb is a Linux PAM (Pluggable Authentication Module) that uses ordinary removable USB storage as a second authentication factor, relying on one-time pad (OTP) files stored on the device to challenge-response authenticate users. The flaw maps to CWE-14 (Compiler Removal of Code to Clear Buffers): the central xfree() deallocation helper wraps free() without invoking a compiler-resistant clearing function such as explicit_bzero() or memset_s() first. Because optimizing compilers may strip a plain memset() call before free(), CWE-14 specifically mandates a compiler-barrier-safe clearing function. Prior hardening work (GHSA-vx6f-rrqr-j87c) had already applied explicit_bzero to certain specific OTP pad code paths, but the generalized xfree() helper - used throughout the codebase for all heap deallocations - was left unpatched, meaning any heap buffer passed through xfree() (credentials, paths, pad bytes) retains its contents in freed heap until a subsequent allocation happens to overwrite it. The affected CPE is cpe:2.3:a:mcdope:pam_usb:*:*:*:*:*:*:*:* covering all versions through 0.9.1.

RemediationAI

Vendor-released patch: pam_usb 0.9.2. The 0.9.2 release explicitly fixes xfree() to clear heap memory before calling free(), preventing sensitive authentication material from lingering in freed regions; release artifacts and notes are available at https://github.com/mcdope/pam_usb/releases/tag/0.9.2. The upgrade is strongly recommended by the vendor because the same release also addresses eleven additional security findings including TOCTOU races on the OTP pad directory, XXE injection via xmlReadFile(), environment variable injection in PAM context, symlink-following attacks on evdev nodes, and compiler/linker hardening gaps - collectively reducing the attack surface that could be chained to exploit this residual-data issue. If immediate upgrade is not possible, a compensating control is to restrict ptrace access for unprivileged users by setting kernel.yama.ptrace_scope=2 (via sysctl), which limits the heap inspection primitives available to local attackers; this does not eliminate the underlying residual data exposure but raises the bar for accessing freed memory. Additionally, ensuring process isolation (no shared address space, no coredump paths accessible to low-privilege users) reduces the window of exploitation.

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

CVE-2026-48985 MEDIUM
5.5 Jun 18

NULL pointer dereference in pam_usb 0.9.1 and below crashes PAM-integrated authentication services (sudo, login) when lo

CVE-2026-48986 MEDIUM
4.7 Jun 18

Infinite loop denial-of-service in pam_usb 0.9.1 and earlier can permanently hang authentication processes such as sudo,

Share

EUVD-2026-37922 vulnerability details – vuln.today

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