Skip to content

deny_remote bypassed by zone-indexed IPv6 addresses (fe80::1%eth0) in pusb_tmux_has_remote_clients

High
mcdope published GHSA-7583-9cqv-j9rf Jul 2, 2026

Software

pam_usb

Affected versions

>= 0.8.0, <= 0.9.2

Patched versions

0.9.3

Description

Summary

The deny_remote feature in pam_usb uses /usr/bin/w -i to detect whether the authenticating user has an active remote tmux session. In pusb_tmux_has_remote_clients() (src/tmux.c), the IPv6 detection pattern matched the address group and then immediately expected whitespace. On Linux systems with multi-homed network interfaces, w -i appends a zone index (scope identifier) to link-local IPv6 addresses — e.g. fe80::1%eth0. The %eth0 suffix appeared between the address and the next whitespace field, causing the regex match to fail even for an otherwise-matching remote session. The function returned "no remote clients" and granted access.

Impact

An attacker who authenticates from a host connected to the target via a link-local IPv6 segment (common on directly-connected or LAN-adjacent systems) has their remote session reported by w with a zone-indexed address. The deny_remote check silently passes and authentication succeeds as if the connection were local.

Link-local addresses (fe80::/10) are ubiquitous — they are assigned automatically on every IPv6-capable interface — and SSH over link-local with a zone index is a standard configuration on isolated management networks and embedded/IoT environments.

Affected versions

All versions from 0.8.0 (when tmux remote-client detection was introduced) up to and including the current latest release (0.9.2 as of this writing). No patched release has been tagged yet; the fix is available on the master branch (PR #423).

Root cause

The IPv6 regex template terminated the address group immediately with ([[:space:]]+), leaving no provision for non-whitespace characters between the address and the next field. A zone index (%ifname) is not whitespace and caused the match to fail:

# old pattern (simplified)
fe80::1          <- matched
fe80::1%eth0     <- not matched (% is not whitespace)

Fix

Appended [^[:space:]]* immediately after the IPv6 address group to absorb any zone-index suffix before matching the whitespace field separator. Fixed in PR #423.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

CVE ID

CVE-2026-64668

Weaknesses

Improper Authorization

The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. Learn more on MITRE.

Protection Mechanism Failure

The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. Learn more on MITRE.

Credits