Description
pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.8.7, src/tmux.c reads the user's $TMUX environment variable, splits it on commas, and interpolates the socket-path component directly into a shell command passed to popen(). Because the value is placed inside double-quotes without sanitisation, any value containing " terminates the quoted string and injects arbitrary shell syntax. popen() runs as root inside the PAM stack. This vulnerability is fixed in 0.8.7.
Published: 2026-05-27
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

pam_usb allows hardware authentication by detecting USB removable media. In versions earlier than 0.8.7, the module reads the user's $TMUX environment variable, splits it on commas, and places the resulting socket-path component directly into a shell command that is executed by popen() as root. Because the value is interpolated into a double‑quoted string without any escaping, an attacker can include a quotation mark and arbitrary shell syntax to break out of the intended command and inject commands. This results in remote code execution with root privileges, enabling complete compromise of the affected machine. The weakness is a command injection (CWE‑78) combined with improper encoding of user input (CWE‑116).

Affected Systems

The vulnerable module belongs to mcdope's pam_usb. All releases prior to version 0.8.7 are affected. No specific CPE identifiers are provided, but any system that runs pam_usb 0.8.6 or earlier and uses the PAM authentication stack is at risk. Upstream indicates that the fix was applied in 0.8.7, so newer releases are not vulnerable.

Risk and Exploitability

With a CVSS score of 8.8 the vulnerability is high severity. No EPSS score is available, and the vulnerability is not listed in the CISA KEV catalog. The exploitation requires an attacker to provide a crafted $TMUX environment variable before the PAM module runs. The likely attack vector is local, as the attacker must influence the environment of a user session that uses pam_usb for authentication. If the attacker gains local access or can set environment variables for a privileged process, they can execute arbitrary shell commands with root privileges. Therefore, urgent remediation is warranted.

Generated by OpenCVE AI on May 27, 2026 at 22:30 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to pam_usb version 0.8.7 or later to remove the vulnerable code path.
  • Ensure that the $TMUX environment variable is not inherited from untrusted sources; clear or sanitize it before pam_usb is invoked on privileged sessions.
  • As a temporary measure, disable the pam_usb PAM module for critical services until the update is available, limiting the attack surface.

Generated by OpenCVE AI on May 27, 2026 at 22:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 30 May 2026 02:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 29 May 2026 16:00:00 +0000

Type Values Removed Values Added
First Time appeared Mcdope
Mcdope pam Usb
Vendors & Products Mcdope
Mcdope pam Usb

Wed, 27 May 2026 21:00:00 +0000

Type Values Removed Values Added
Description pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.8.7, src/tmux.c reads the user's $TMUX environment variable, splits it on commas, and interpolates the socket-path component directly into a shell command passed to popen(). Because the value is placed inside double-quotes without sanitisation, any value containing " terminates the quoted string and injects arbitrary shell syntax. popen() runs as root inside the PAM stack. This vulnerability is fixed in 0.8.7.
Title pam_usb: Command injection via $TMUX environment variable leads to RCE as root
Weaknesses CWE-116
CWE-78
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-30T01:48:00.396Z

Reserved: 2026-05-07T17:07:09.318Z

Link: CVE-2026-44713

cve-icon Vulnrichment

Updated: 2026-05-30T01:47:56.097Z

cve-icon NVD

Status : Deferred

Published: 2026-05-27T21:16:18.363

Modified: 2026-06-17T10:51:15.890

Link: CVE-2026-44713

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-29T15:50:00Z

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output

  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')