Bug 2008291 (CVE-2021-41617) - CVE-2021-41617 openssh: privilege escalation when AuthorizedKeysCommand or AuthorizedPrincipalsCommand are configured
Summary: CVE-2021-41617 openssh: privilege escalation when AuthorizedKeysCommand or Au...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-41617
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2011169 2008292 2008884 2008885 2008886 2011167 2011168
Blocks: 2008294
TreeView+ depends on / blocked
 
Reported: 2021-09-27 20:00 UTC by Guilherme de Almeida Suckevicz
Modified: 2022-05-27 09:14 UTC (History)
19 users (show)

Fixed In Version: openssh 8.8
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in OpenSSH. 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. Depending on system configuration, inherited groups may allow AuthorizedKeysCommand/AuthorizedPrincipalsCommand helper programs to gain unintended privileges, potentially leading to local privilege escalation.
Clone Of:
Environment:
Last Closed: 2021-11-23 18:09:01 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4782 0 None None None 2021-11-23 17:14:49 UTC
Red Hat Product Errata RHSA-2022:2013 0 None None None 2022-05-10 14:54:55 UTC

Description Guilherme de Almeida Suckevicz 2021-09-27 20:00:37 UTC
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.

References:
https://www.openwall.com/lists/oss-security/2021/09/26/1
https://www.openssh.com/txt/release-8.8
https://www.openssh.com/security.html

Comment 1 Guilherme de Almeida Suckevicz 2021-09-27 20:00:55 UTC
Created openssh tracking bugs for this issue:

Affects: fedora-all [bug 2008292]

Comment 7 Mauro Matteo Cascella 2021-10-14 15:43:13 UTC
From sshd_config's man page [1] helper programs for AuthorizedKeysCommand/AuthorizedPrincipalsCommand must be owned by root and not writable by group or others. This flaw requires local system access for the unprivileged malicious user to be able to tamper with the process being run to potentially gain additional privileges on the system.

[1] https://man.openbsd.org/sshd_config#AuthorizedKeysCommand

Comment 10 errata-xmlrpc 2021-11-23 17:14:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2021:4782 https://access.redhat.com/errata/RHSA-2021:4782

Comment 11 Product Security DevOps Team 2021-11-23 18:08:58 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-41617

Comment 12 errata-xmlrpc 2022-05-10 14:54:52 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:2013 https://access.redhat.com/errata/RHSA-2022:2013


Note You need to log in before you can comment on or make changes to this bug.