Cloudanix VulnDB

CVE-2021-36368

Low · 3.7

CVSS

3.7

EPSS

1.7%

Published

Mar 13, 2022

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

Users of hardware security keys for remote logins may receive an unclear prompt that could let a compromised server forward their login privileges to another machine without them realizing it.

Exploitation
Other
Attacker needs
High Privilege
Complexity
High
Impact
Other
Component
Network Service
Class
Authentication Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

In OpenSSH before 8.9, when using public-key authentication with agent forwarding and FIDO tokens without verbose logging, a server modified to advertise the None authentication method can cause the client to display an ambiguous confirmation prompt that does not distinguish between direct server connection and agent forwarding to a third party.

Why it matters to the business

Organizations using hardware-backed SSH keys with agent forwarding face a small risk that users may inadvertently approve forwarding to an attacker-controlled host, potentially allowing lateral movement through the user's agent without clear user awareness.

How an attack unfolds

An attacker first deploys a malicious SSH server that advertises support for the None authentication method. When a victim client connects using public-key authentication with agent forwarding and a FIDO token (without -oLogLevel=verbose), the ambiguous confirmation prompt leads the user to approve the connection. This can result in the attacker gaining the ability to use the forwarded agent for further connections on the user's behalf.

How to fix it

Upgrade OpenSSH to version 8.9 or later, which contains the fix from commit 166456cedad3962b83b848b1e9caf80794831f0f. Enable verbose logging during connections that use agent forwarding with FIDO tokens to make the purpose of each confirmation explicit.

How to confirm the fix worked

Confirm the installed OpenSSH version is 8.9 or newer. Test connections with agent forwarding and FIDO tokens both with and without -oLogLevel=verbose to verify that confirmation prompts clearly indicate whether forwarding is being requested.

Typical attack path

  1. Deploy a malicious SSH server advertising the None authentication method
  2. Wait for a victim to initiate a public-key connection with agent forwarding and FIDO token without verbose logging
  3. Present the ambiguous FIDO confirmation prompt to the victim
  4. Obtain user approval that enables agent forwarding to the attacker's server
  5. Use the forwarded agent to authenticate to other hosts on the victim's behalf

How to detect it

Review SSH client logs for connections that used agent forwarding with FIDO tokens; look for repeated or unexpected forwarding confirmations. Monitor for servers advertising the None authentication method during public-key exchanges.

What your security team should do

  • Prioritize upgrade of all OpenSSH installations to 8.9 or later within standard change windows
  • Update internal SSH client configurations and documentation to recommend -oLogLevel=verbose when agent forwarding is used
  • Review and restrict agent forwarding permissions in sshd_config where possible

The record

An issue was discovered in OpenSSH before 8.9. If a client is using public-key authentication with agent forwarding but without -oLogLevel=verbose, and an attacker has silently modified the server to support the None authentication option, then the user cannot determine whether FIDO authentication is going to confirm that the user wishes to connect to that server, or that the user wishes to allow that server to connect to a different server on the user's behalf. NOTE: the vendor's position is "this is not an authentication bypass, since nothing is being bypassed.

Affected packages

Ecosystem Package Introduced Fixed
Debian:10 openssh 0 No fix
Debian:11 openssh 0 No fix
Debian:12 openssh 0 1:8.9p1-1
Debian:13 openssh 0 1:8.9p1-1
Debian:14 openssh 0 1:8.9p1-1

Related vulnerabilities