# GHSA-7J35-3378-8QVG: authd restart during first-time SSH login can give a session another user's UID

- Database: GitHub
- Severity: CVSS 7.2 (High)
- Published: 2026-11-25
- Modified: 2026-11-25

## Tracked as

- [CVE-2026-123879](https://cve.now/CVE-2026-123879.md): Canonical authd access control bypass in SSH login ID reservation

## Description

### Impact

An attacker with valid credentials can complete a first-time SSH login with another account's UID and an incorrect primary GID. This allows the attacker to read or modify files owned by that account and could enable account takeover or privilege escalation. Supplementary groups remain those of the attacker's own account.

### Details

sshd caches the UID and primary GID returned by its user lookup before authentication. After successful authentication, it uses those cached values to set the session's UID and primary GID.

For a first-time login, the account is not yet stored in authd's user database, but sshd still needs a user record before authentication can proceed. authd reserves IDs for that account so the lookup can return them without creating a permanent account before authentication succeeds. These reservations are kept in memory.

If authd restarts while authentication is pending, it loses the reservation. Another new account can receive the released UID and complete authentication. When the original connection then authenticates, authd assigns it a different UID, but sshd starts the session using the cached identity. The session therefore runs with the other account's UID and a stale primary GID.

Exploitation requires all of the following:

- The attacker has valid credentials for an account not yet stored in authd's user database.
- authd restarts while the attacker's SSH connection is waiting for authentication, and the connection remains open.
- Another new account receives the released UID and completes authentication before the attacker finishes authenticating on the original connection.

### Patches

This vulnerability is fixed in authd 0.7.2. Users should upgrade to 0.7.2 or later.

## References

- https://github.com/canonical/authd/security/advisories/GHSA-7j35-3378-8qvg

Page: https://cve.now/GHSA-7J35-3378-8QVG

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
