pam_usb trusts an environment variable, bypassing the XRDP deny rule
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
pam_usb by mcdope is affected before version 0.9.3. Its pusb_local_login function reads the XRDP_SESSION environment variable with getenv, which is unsafe for deciding whether a session is remote (CWE-807). A local user with low privileges can clear that variable before a setuid PAM host loads pam_usb.so, which bypasses the explicit XRDP deny rule. Other remote-detection signals may still catch the session.
Written with Claude Haiku 5.5 from the sources below · 2026-11-11
Description from the CNA
pam_usb provides hardware authentication for Linux using removable media. Prior to version 0.9.3, src/local.c reads XRDP_SESSION with plain getenv(3) at the head of pusb_local_login while every other env consumer in the same function uses secure_getenv(3). When pam_usb.so loads into a setuid PAM host, the calling user controls the environment passed in. Clearing XRDP_SESSION before invoking the host bypasses the explicit XRDP-deny rule. Other remote-detection signals (rmsvc, evdev, loginctl, utmp) may still catch the session, but the env-based detection alone is defeated. This issue has been patched in version 0.9.3.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Upgrade pam_usb to version 0.9.3, which fixes this issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-11
- Fix · CNA pam_usb (mcdope) Fixed in 0.9.3
Timeline
- 2026-11-11 Threatist record created from CVE-2026-64666
- 2026-11-12 Priority changed: MEDIUM → LOW
- 2026-11-13 CISA SSVC decision points changed
References
More mcdope vulnerabilities
- TI-2026-35505 pam_usb: PAM_RHOST check skipped when deny_remote=false allows XDMCP authentication bypass CVSS 3.1HIGH 8.1
- TI-2026-32598 pam_usb: Symlink attacks on pad directory and pad files enable authentication bypass and root file corruption CVSS 3.1HIGH 7.9
- TI-2026-32596 pam_usb: PINENTRY_FALLBACK_APP environment variable allows arbitrary command execution CVSS 3.1HIGH 7.8
- TI-2026-32600 pam_usb: Command injection via $TMUX environment variable leads to RCE as root CVSS 3.1HIGH 8.8
- TI-2026-32599 pam_usb: Shell injection via device UUID and username in pamusb-conf and pamusb-agent CVSS 3.1HIGH 8.2
- TI-2026-89569 pam_usb deny_remote bypassed by compressed IPv6 addresses CVSS 3.1HIGH 7.4
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences