Cloudanix VulnDB

CVE-2021-41617

High · 7.0

CVSS

7.0

EPSS

2.5%

Published

Sep 26, 2021

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A problem in SSH server software can let users with limited access gain much higher control of the computer when certain advanced settings are enabled.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
High
Impact
Privilege Gain
Component
Network Service
Class
Privilege Escalation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

sshd fails to initialize supplemental groups when executing helper programs for AuthorizedKeysCommand or AuthorizedPrincipalsCommand under non-default configurations that run the command as a different user, allowing the helpers to inherit the group privileges of the sshd process.

Why it matters to the business

Attackers with local access can obtain elevated privileges on systems running vulnerable OpenSSH versions with specific command configurations, potentially leading to full system compromise and unauthorized access to sensitive resources.

How an attack unfolds

An attacker with a local account on a system using non-default AuthorizedKeysCommand or AuthorizedPrincipalsCommand settings connects via SSH; the sshd process spawns the helper without resetting supplemental groups, allowing the helper to run with unintended elevated group privileges that the attacker can then leverage for privilege escalation.

How to fix it

Upgrade OpenSSH to version 8.8 or later; for Git-based installations apply the fix from commit bf944e3794eff5413f2df1ef37cddf96918c6bde. Review and restrict use of AuthorizedKeysCommand and AuthorizedPrincipalsCommand running as a different user.

How to confirm the fix worked

Confirm the installed OpenSSH version is 8.8 or newer, or verify the sshd source contains the group initialization fix from the referenced commit; test configurations that invoke the commands to ensure supplemental groups are cleared.

Typical attack path

  1. Identify a target system running vulnerable OpenSSH with non-default AuthorizedKeysCommand or AuthorizedPrincipalsCommand configuration.
  2. Obtain a local user account on the target.
  3. Trigger SSH authentication that invokes the helper program.
  4. Abuse the inherited supplemental group privileges to escalate to higher access levels.

How to detect it

Review sshd authentication logs and process execution records for invocations of AuthorizedKeysCommand or AuthorizedPrincipalsCommand helpers; look for unexpected group context or privilege changes during SSH sessions on unpatched systems.

What your security team should do

  • Prioritize patching all OpenSSH instances to 8.8 or later within the next maintenance window.
  • Audit sshd_config files for non-default AuthorizedKeysCommand and AuthorizedPrincipalsCommand settings.
  • Disable or restrict use of these commands where possible until patched.
  • Monitor for local privilege escalation attempts on affected hosts.

The record

sshd in OpenSSH 6.2 through 8.x before 8.8, when certain non-default configurations are used, allows privilege escalation because supplemental groups are not initialized as expected. Helper programs for AuthorizedKeysCommand and AuthorizedPrincipalsCommand may run with privileges associated with group memberships of the sshd process, if the configuration specifies running the command as a different user.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 openssh 0 8.0p1-13.el8
AlmaLinux:8 openssh-askpass 0 8.0p1-13.el8
AlmaLinux:8 openssh-cavs 0 8.0p1-13.el8
AlmaLinux:8 openssh-clients 0 8.0p1-13.el8
AlmaLinux:8 openssh-keycat 0 8.0p1-13.el8
AlmaLinux:8 openssh-ldap 0 8.0p1-13.el8
AlmaLinux:8 openssh-server 0 8.0p1-13.el8
AlmaLinux:8 pam_ssh_agent_auth 0 0.10.3-7.13.el8
Alpine:v3.11 openssh 0 8.1_p1-r1
Alpine:v3.12 openssh 0 8.3_p1-r3
Alpine:v3.13 openssh 0 8.4_p1-r4
Alpine:v3.14 openssh 0 8.6_p1-r3
Alpine:v3.15 openssh 0 8.8_p1-r0
Alpine:v3.16 openssh 0 8.8_p1-r0
Alpine:v3.17 openssh 0 8.8_p1-r0
Alpine:v3.18 openssh 0 8.8_p1-r0
Alpine:v3.19 openssh 0 8.8_p1-r0
Alpine:v3.20 openssh 0 8.8_p1-r0
Alpine:v3.21 openssh 0 8.8_p1-r0
Alpine:v3.22 openssh 0 8.8_p1-r0
Debian:10 openssh 0 1:7.9p1-10+deb10u4
Debian:11 openssh 0 1:8.4p1-5+deb11u3
Debian:12 openssh 0 1:8.7p1-1
Debian:13 openssh 0 1:8.7p1-1
Debian:14 openssh 0 1:8.7p1-1
Mageia:8 openssh 0 8.4p1-2.2.mga8
Red Hat:enterprise_linux:7::client openssh 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::client openssh-askpass 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::client openssh-cavs 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::client openssh-clients 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::client openssh-debuginfo 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::client openssh-keycat 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::client openssh-ldap 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::client openssh-server 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::client openssh-server-sysvinit 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::client pam_ssh_agent_auth 0 0:0.10.3-2.22.el7_9
Red Hat:enterprise_linux:7::computenode openssh 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::computenode openssh-askpass 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::computenode openssh-cavs 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::computenode openssh-clients 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::computenode openssh-debuginfo 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::computenode openssh-keycat 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::computenode openssh-ldap 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::computenode openssh-server 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::computenode openssh-server-sysvinit 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::computenode pam_ssh_agent_auth 0 0:0.10.3-2.22.el7_9
Red Hat:enterprise_linux:7::server openssh 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::server openssh-askpass 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::server openssh-cavs 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::server openssh-clients 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::server openssh-debuginfo 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::server openssh-keycat 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::server openssh-ldap 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::server openssh-server 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::server openssh-server-sysvinit 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::server pam_ssh_agent_auth 0 0:0.10.3-2.22.el7_9
Red Hat:enterprise_linux:7::workstation openssh 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::workstation openssh-askpass 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::workstation openssh-cavs 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::workstation openssh-clients 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::workstation openssh-debuginfo 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::workstation openssh-keycat 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::workstation openssh-ldap 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::workstation openssh-server 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::workstation openssh-server-sysvinit 0 0:7.4p1-22.el7_9
Red Hat:enterprise_linux:7::workstation pam_ssh_agent_auth 0 0:0.10.3-2.22.el7_9
Red Hat:enterprise_linux:8::appstream openssh 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-askpass 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-askpass-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-cavs 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-cavs-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-clients 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-clients-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-debugsource 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-keycat 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-keycat-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-ldap 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-ldap-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-server 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream openssh-server-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::appstream pam_ssh_agent_auth 0 0:0.10.3-7.13.el8
Red Hat:enterprise_linux:8::appstream pam_ssh_agent_auth-debuginfo 0 0:0.10.3-7.13.el8
Red Hat:enterprise_linux:8::baseos openssh 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-askpass 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-askpass-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-cavs 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-cavs-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-clients 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-clients-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-debugsource 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-keycat 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-keycat-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-ldap 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-ldap-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-server 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos openssh-server-debuginfo 0 0:8.0p1-13.el8
Red Hat:enterprise_linux:8::baseos pam_ssh_agent_auth 0 0:0.10.3-7.13.el8
Red Hat:enterprise_linux:8::baseos pam_ssh_agent_auth-debuginfo 0 0:0.10.3-7.13.el8
Rocky Linux:8 openssh 0 0:8.0p1-13.el8
SUSE:Enterprise Storage 6 openssh 0 7.9p1-6.28.1
SUSE:Enterprise Storage 6 openssh-askpass-gnome 0 7.9p1-6.28.1
SUSE:Enterprise Storage 7 openssh 0 8.1p1-5.21.1
SUSE:Enterprise Storage 7 openssh-askpass-gnome 0 8.1p1-5.21.1
SUSE:HPE Helion OpenStack 8 openssh 0 7.2p2-74.60.1
SUSE:HPE Helion OpenStack 8 openssh-askpass-gnome 0 7.2p2-74.60.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS openssh 0 7.9p1-6.28.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS openssh-askpass-gnome 0 7.9p1-6.28.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS openssh 0 7.9p1-6.28.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS openssh-askpass-gnome 0 7.9p1-6.28.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS openssh 0 8.1p1-5.21.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS openssh-askpass-gnome 0 8.1p1-5.21.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS openssh 0 8.1p1-5.21.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS openssh-askpass-gnome 0 8.1p1-5.21.1
SUSE:Linux Enterprise High Performance Computing 15-ESPOS openssh 0 7.6p1-9.44.1
SUSE:Linux Enterprise High Performance Computing 15-ESPOS openssh-askpass-gnome 0 7.6p1-9.44.1
SUSE:Linux Enterprise High Performance Computing 15-LTSS openssh 0 7.6p1-9.44.1
SUSE:Linux Enterprise High Performance Computing 15-LTSS openssh-askpass-gnome 0 7.6p1-9.44.1
SUSE:Linux Enterprise Micro 5.0 openssh 0 8.1p1-5.21.1
SUSE:Linux Enterprise Micro 5.1 openssh 0 8.4p1-3.6.1
SUSE:Linux Enterprise Module for Basesystem 15 SP3 openssh 0 8.4p1-3.6.1
SUSE:Linux Enterprise Module for Desktop Applications 15 SP3 openssh-askpass-gnome 0 8.4p1-3.6.1
SUSE:Linux Enterprise Module for Server Applications 15 SP3 openssh 0 8.4p1-3.6.1
SUSE:Linux Enterprise Real Time 15 SP2 openssh 0 8.1p1-5.21.1
SUSE:Linux Enterprise Real Time 15 SP2 openssh-askpass-gnome 0 8.1p1-5.21.1
SUSE:Linux Enterprise Server 11 SP4-LTSS openssh 0 6.6p1-36.26.1
SUSE:Linux Enterprise Server 11 SP4-LTSS openssh-askpass-gnome 0 6.6p1-36.26.1
SUSE:Linux Enterprise Server 11-SECURITY openssh-openssl1 0 6.6p1-19.12.1
SUSE:Linux Enterprise Server 12 SP2-BCL openssh 0 7.2p2-74.60.1
SUSE:Linux Enterprise Server 12 SP2-BCL openssh-askpass-gnome 0 7.2p2-74.60.1
SUSE:Linux Enterprise Server 12 SP3-BCL openssh 0 7.2p2-74.60.1
SUSE:Linux Enterprise Server 12 SP3-BCL openssh-askpass-gnome 0 7.2p2-74.60.1
SUSE:Linux Enterprise Server 12 SP3-LTSS openssh 0 7.2p2-74.60.1
SUSE:Linux Enterprise Server 12 SP3-LTSS openssh-askpass-gnome 0 7.2p2-74.60.1
SUSE:Linux Enterprise Server 12 SP4-LTSS openssh 0 7.2p2-78.13.1
SUSE:Linux Enterprise Server 12 SP4-LTSS openssh-askpass-gnome 0 7.2p2-78.13.1
SUSE:Linux Enterprise Server 12 SP5 openssh 0 7.2p2-78.13.1
SUSE:Linux Enterprise Server 12 SP5 openssh-askpass-gnome 0 7.2p2-78.13.1
SUSE:Linux Enterprise Server 15 SP1-BCL openssh 0 7.9p1-6.28.1
SUSE:Linux Enterprise Server 15 SP1-BCL openssh-askpass-gnome 0 7.9p1-6.28.1
SUSE:Linux Enterprise Server 15 SP1-LTSS openssh 0 7.9p1-6.28.1
SUSE:Linux Enterprise Server 15 SP1-LTSS openssh-askpass-gnome 0 7.9p1-6.28.1
SUSE:Linux Enterprise Server 15 SP2-BCL openssh 0 8.1p1-5.21.1
SUSE:Linux Enterprise Server 15 SP2-BCL openssh-askpass-gnome 0 8.1p1-5.21.1
SUSE:Linux Enterprise Server 15 SP2-LTSS openssh 0 8.1p1-5.21.1
SUSE:Linux Enterprise Server 15 SP2-LTSS openssh-askpass-gnome 0 8.1p1-5.21.1
SUSE:Linux Enterprise Server 15-LTSS openssh 0 7.6p1-9.44.1
SUSE:Linux Enterprise Server 15-LTSS openssh-askpass-gnome 0 7.6p1-9.44.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 openssh 0 7.2p2-74.60.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP3 openssh-askpass-gnome 0 7.2p2-74.60.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP4 openssh 0 7.2p2-78.13.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP4 openssh-askpass-gnome 0 7.2p2-78.13.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 openssh 0 7.2p2-78.13.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 openssh-askpass-gnome 0 7.2p2-78.13.1
SUSE:Linux Enterprise Server for SAP Applications 15 openssh 0 7.6p1-9.44.1
SUSE:Linux Enterprise Server for SAP Applications 15 openssh-askpass-gnome 0 7.6p1-9.44.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP1 openssh 0 7.9p1-6.28.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP1 openssh-askpass-gnome 0 7.9p1-6.28.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 openssh 0 8.1p1-5.21.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 openssh-askpass-gnome 0 8.1p1-5.21.1
SUSE:Manager Proxy 4.1 openssh 0 8.1p1-5.21.1
SUSE:Manager Proxy 4.1 openssh-askpass-gnome 0 8.1p1-5.21.1
SUSE:Manager Retail Branch Server 4.1 openssh 0 8.1p1-5.21.1
SUSE:Manager Retail Branch Server 4.1 openssh-askpass-gnome 0 8.1p1-5.21.1
SUSE:Manager Server 4.1 openssh 0 8.1p1-5.21.1
SUSE:Manager Server 4.1 openssh-askpass-gnome 0 8.1p1-5.21.1
SUSE:OpenStack Cloud 8 openssh 0 7.2p2-74.60.1
SUSE:OpenStack Cloud 8 openssh-askpass-gnome 0 7.2p2-74.60.1
SUSE:OpenStack Cloud 9 openssh 0 7.2p2-78.13.1
SUSE:OpenStack Cloud 9 openssh-askpass-gnome 0 7.2p2-78.13.1
SUSE:OpenStack Cloud Crowbar 8 openssh 0 7.2p2-74.60.1
SUSE:OpenStack Cloud Crowbar 8 openssh-askpass-gnome 0 7.2p2-74.60.1
SUSE:OpenStack Cloud Crowbar 9 openssh 0 7.2p2-78.13.1
SUSE:OpenStack Cloud Crowbar 9 openssh-askpass-gnome 0 7.2p2-78.13.1
Ubuntu:18.04:LTS openssh-ssh1 0 No fix
Ubuntu:20.04:LTS openssh 0 1:8.2p1-4ubuntu0.11
Ubuntu:20.04:LTS openssh-ssh1 0 No fix
Ubuntu:22.04:LTS openssh 0 1:8.9p1-3
Ubuntu:22.04:LTS openssh 0 1:8.9p1-3ubuntu0.6
Ubuntu:22.04:LTS openssh-ssh1 0 No fix
Ubuntu:23.10 openssh 0 1:9.3p1-1ubuntu3.2
Ubuntu:24.04:LTS openssh-ssh1 0 No fix
Ubuntu:24.10 openssh-ssh1 0 No fix
Ubuntu:25.04 openssh-ssh1 0 No fix
Ubuntu:25.10 openssh-ssh1 0 No fix
Ubuntu:Pro:14.04:LTS openssh 0 No fix
Ubuntu:Pro:16.04:LTS openssh 0 1:7.2p2-4ubuntu2.10+esm2
Ubuntu:Pro:18.04:LTS openssh 0 No fix
Ubuntu:Pro:18.04:LTS openssh-ssh1 0 No fix
Ubuntu:Pro:20.04:LTS openssh-ssh1 0 No fix
Ubuntu:Pro:FIPS-updates:18.04:LTS openssh 0 No fix
Ubuntu:Pro:FIPS-updates:20.04:LTS openssh 0 1:8.2p1-4ubuntu0.fips.0.11
Ubuntu:Pro:FIPS-updates:24.04:LTS openssh 0 No fix
Ubuntu:Pro:FIPS:16.04:LTS openssh 0 No fix
Ubuntu:Pro:FIPS:16.04:LTS openssh 0 1:7.2p2-4ubuntu2.fips.2.10.3
Ubuntu:Pro:FIPS:18.04:LTS openssh 0 No fix
Ubuntu:Pro:FIPS:20.04:LTS openssh 0 No fix
openSUSE:Leap 15.3 openssh 0 8.4p1-3.6.1
openSUSE:Leap 15.3 openssh-askpass-gnome 0 8.4p1-3.6.1

Related vulnerabilities