Skip to main content
← Vulnerabilities

pam_usb: getenv() in pusb_local_login bypasses XRDP deny via env-var unset

Affects pam_usb through 0.9.2 when pam_usb.so loads into a setuid PAM host. The fix is in 0.9.3. CVSS scores it 7.1 (High); no vendor severity rating is given.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

7.1HighCNA
Exploited
No known exploitation
Fix
Fixed in 0.9.3
Who is exposed
Specific setups only

Do first: Check whether your setup matches what the bug needs. pam_usb releases that include the XRDP env-var deny block (affected through 0.9.2) pam_usb.so is loaded into a setuid PAM host

Published
Last modified
Reference
Last checked
12/100 · provisional
Specific setups only
None on Exploit-DB, Metasploit or GitHub

Summary

pam_usb, a hardware authentication module for Linux that uses removable media, has a flaw where it reads the XRDP_SESSION environment variable with plain getenv instead of secure_getenv, so a local user who is already logged in can clear that variable before the module runs and get past its rule that denies logins from XRDP remote sessions. The attacker needs only low-privilege local access and no user interaction, and the flaw is fixed in a later release.

Read the original description

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.

Who should check

Teams running pam_usb 0.9.2 or earlier where pam_usb.so is loaded into setuid PAM hosts such as login, su, sudo or polkit helpers

Read the source excerpt

“When pam_usb.so is loaded into a setuid PAM host (login, su, sudo, polkit-agent-helper)”

github.com

cve.now Index

12Pcve.now Index 12 of 100 · methodology v3 · provisional
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure5/25Specific setups only
  • Reach?/20Unknown. No tracked technology or package matched
  • Severity7.1/10CVSS 7.1
  • No patch0/5No signal

What would change the score

  • Would score about 62 if added to CISA KEV
  • Would score about 57 if CISA's SSVC rates exploitation active
  • Would score about 22 if CISA's SSVC rates it automatable

What to do

  • Check whether your setup matches what the bug needs.

    pam_usb releases that include the XRDP env-var deny block (affected through 0.9.2) pam_usb.so is loaded into a setuid PAM host
  • Upgrade to a fixed version: 0.9.3.

Check your systems with an agent

Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.

Check whether my systems are affected by CVE-2026-64666 (pam_usb: getenv() in pusb_local_login bypasses XRDP deny via env-var unset), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-64666 (entry last updated 2026-11-11):
Affected:
- mcdope pam_usb: fixed in 0.9.3
Fixed versions: 0.9.3.
Conditions (all must be true for the bug to be hit):
- pam_usb releases that include the XRDP env-var deny block (affected through 0.9.2) (source: https://github.com/mcdope/pam_usb/security/advisories/GHSA-ffx6-xjp6-x33g)
- pam_usb.so is loaded into a setuid PAM host (source: https://github.com/mcdope/pam_usb/security/advisories/GHSA-ffx6-xjp6-x33g)
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: local access, low-privilege login, no user action.
CISA KEV: CVE-2026-64666 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-64666 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/mcdope/pam_usb/security/advisories/GHSA-ffx6-xjp6-x33g
- https://github.com/mcdope/pam_usb/issues/410
- https://github.com/mcdope/pam_usb/pull/417
- https://github.com/mcdope/pam_usb/commit/0b179ed679d6522c6a571c5a8ae9bdc7edbad31f
- https://github.com/mcdope/pam_usb/releases/tag/0.9.3
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-64666
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example get_vulnerability with id CVE-2026-64666.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • mcdope pam_usb

    fixed in 0.9.3

Evidence 7

Vendor advisory · 1

Establishes: Affected and fixed versions.

  1. Advisory

CVE record · 2

Establishes: The identifier and description.

  1. Record
  2. Record

Other links · 4

  1. Repository
  2. Repository
  3. Repository
  4. Repository

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

Questions about CVE-2026-64666

Is CVE-2026-64666 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data

What does this mean?

pam_usb's explicit XRDP deny rule can be bypassed by clearing the XRDP_SESSION environment variable before the PAM host is invoked. When other remote-detection signals are inconclusive, this can allow authentication for the affected user.Source: github.com

Which versions are affected by CVE-2026-64666?

pam_usb: before 0.9.3.Source: cve.now feed data

Am I affected, and how do I check?

Releases that include the XRDP env-var deny block, which the advisory says are affected through 0.9.2. The bypass applies when pam_usb.so is loaded into a setuid PAM host, where the calling user controls the environment passed in. To check, compare the installed pam_usb package version against 0.9.2 using your distribution's package manager, and see whether pam_usb is configured in a setuid PAM host.Source: github.com

How do I fix CVE-2026-64666?

Upgrade pam_usb to 0.9.3, the fixed release.Source: github.com