/

CVE-2026-64668

Severity:

HIGH RISK

(7.4)

Remote Access Control Bypass (CWE-693) in pam_usb tmux

CVE-2026-64668

Deferred

Vulnerability type

Category:

Access-Control Check Bypass

CWE:

CWE-285, CWE-693

Impact:

Bypass of the remote-session access restriction

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

pam_usb's deny_remote check can fail to recognize an active remote tmux session when Linux reports a link-local IPv6 address with a zone index. If the check misses the session, access may be granted despite the configured remote-session restriction.

Affected context

The issue affects pam_usb deployments in which deny_remote is enabled and the tmux check parses output from /usr/bin/w -i. On systems where that output includes a scope identifier on a link-local IPv6 address, the address can fail to match the expected pattern. The check may then report no remote clients even when a remote tmux session is active.

Exploit preconditions

  • Attack surface: A PAM authentication flow using pam_usb with the deny_remote feature enabled
  • Required access: The ability to reach the relevant authentication point; other configured authentication requirements may still apply
  • Trigger point: The tmux remote-client check while processing /usr/bin/w -i output
  • Why exploitation is possible: A zone index appended to a link-local IPv6 address can cause the detection pattern to miss an active remote session, allowing the check to fail open

Why this happens

The remote-session protection relies on pattern matching command output, but the pattern does not account for IPv6 scope identifiers. When the expected address is followed by a zone index before whitespace, the match fails and the function treats the session as absent. This is a failure of a security protection mechanism (CWE-693) that can result in an access-control check being bypassed (CWE-285).

Potential impact

  • A user may be allowed to authenticate despite an active remote tmux session when deny_remote is intended to block access
  • The configured restriction on remote-session access could be weakened or ineffective on affected systems
  • Additional access may be possible if the user also satisfies the other authentication requirements

General mitigation guidance

Defensive patterns include making security checks robust to documented variations in system command output and treating parsing errors or unexpected formats as indeterminate rather than as proof that a session is absent. Prefer structured interfaces over parsing human-oriented command output, and apply strict validation to any parsed fields. Keep authentication decisions fail-closed where appropriate, and limit the privileges available to authentication components.

How teams detect issues like this

  • Review code that parses /usr/bin/w -i output for assumptions about IPv6 address formatting and whitespace boundaries.
  • Use static analysis or code review to identify security checks that treat failed matches as evidence that a risky condition is absent.
  • Test the detection logic with link-local IPv6 addresses both with and without scope identifiers, including on multi-homed systems.
  • Apply policy checks that flag authentication decisions based on fragile parsing of command output; automated code review tools may help surface these patterns.

Sources

SourceLink
github.comgithub.com/mcdope/pam_usb/commit/a62513f3da871d6576d751de3482eb80b9ac79f3
github.comgithub.com/mcdope/pam_usb/pull/423
github.comgithub.com/mcdope/pam_usb/releases/tag/0.9.3
github.comgithub.com/mcdope/pam_usb/security/advisories/GHSA-7583-9cqv-j9rf

Frequently asked

questions

Not necessarily. The issue can bypass the deny_remote restriction; other configured authentication requirements may still apply.

The feature must be enabled, a remote tmux session must be active, and the parsed output must include an IPv6 scope identifier in a format the check does not recognize.

Use robust, structured session detection where possible, and ensure that unexpected or unparseable results do not silently clear a security restriction.

Test parsers against realistic output variations, review security checks for fail-open behavior, and enforce policy that treats uncertain detection results conservatively.

Find out what's already
exploitable in your codebase.