Sudo Permission Elevation Vulnerability (CVE-2023-22809) Notification

Sudo Permission Elevation Vulnerability (CVE-2023-22809) Notification

March 31, 2023 | NSFOCUS

Overview

Recently, NSFOCUS CERT found that the analysis article and ExP of Sudo privilege enhancement vulnerability (CVE-2023-22809) were publicly disclosed online. Since sudoedit in Sudo has a flaw in handling additional parameters passed in user provided environment variables such as SUDO_EDITOR, VISUAL, and EDITOR., when a user specified editor contains a “–” parameter that bypasses the sudoers policy, a local attacker with sudoedit access can achieve privilege escalation on the target system by attaching arbitrary entries to the list of files to process. In addition, this vulnerability also affects some QNAP operating systems: QTS, QuTS heros, QuTScloud, and QVP (QVR Pro devices). Based on comprehensive judgment, this vulnerability only affects customers who have added specific configurations, and the scope of impact is relatively limited. Please protect relevant users according to their actual situation.

Reference link:

https://www.openwall.com/lists/oss-security/2023/01/19/1

https://www.qnap.com/en/security-advisory/qsa-23-11

Scope of Impact

Affected version

Sudo:

  • 1.8.0 <= Sudo <= 1.9.12p1

QTS and QuTS hero:

  • QTS < 5.0.1.2346 build 20230322
  • QuTS < hero h5.0.1.2348 build 20230324

Unaffected version

Sudo:

  • Sudo >= 1.9.12.p2

Note: Sudo was not affected by this vulnerability before 1.8.0

QTS and QuTS heros:

  • QTS >= 5.0.1.2346 build 20230322
  • QuTS >= hero h5.0.1.2348 build 20230324

Detection

Relevant users can determine whether the current application is at risk through version detection. You can view the current version using the following command.

sudo -V

If the version is within the affected range, there may be a security risk.

Mitigation

1. A new version has been officially released to fix this vulnerability. It is recommended that affected users promptly install protection: https://www.sudo.ws/releases/stable/

2. Currently, mainstream Linux distributions have released security patches or updated versions to fix this vulnerability. It is recommended that users install patches as soon as possible or refer to official measures for protection:

Linux distributionOfficial announcement
Ubuntuubuntu.com/security/CVE-2023-22809
Debainsecurity-tracker.debian.org/tracker/CVE-2023-22809
Redhataccess.redhat.com/security/cve/CVE-2023-22809
Gentoobugs.gentoo.org/891335
Mageiaadvisories.mageia.org/CVE-2023-22809.html

Note: If you use the package manager to update the Linux distribution of Sudo, such as Ubuntu, Debian, and CentOS, you can directly run the following commands to update and repair:

Ubuntu, Debian

sudo apt-get update
sudo apt-get upgrade

CentOS

sudo yum update sudo

3. Affected QNAP systems: QTS, QuTS heros, QuTScloud, and QVP (QVR Pro devices). Please refer to the following link for details of repair solutions:

https://www.qnap.com/en/security-advisory/qsa-23-11

Statement

This advisory is only used to describe a potential risk. NSFOCUS does not provide any commitment or promise on this advisory. NSFOCUS and the author will not bear any liability for any direct and/or indirect consequences and losses caused by transmitting and/or using this advisory. NSFOCUS reserves all the rights to modify and interpret this advisory. Please include this statement paragraph when reproducing or transferring this advisory. Do not modify this advisory, add/delete any information to/from it, or use this advisory for commercial purposes without permission from NSFOCUS.

About NSFOCUS

NSFOCUS, Inc., a global network and cyber security leader, protects enterprises and carriers from advanced cyber attacks. The company’s Intelligent Hybrid Security strategy utilizes both cloud and on-premises security platforms, built on a foundation of real-time global threat intelligence, to provide multi-layered, unified and dynamic protection against advanced cyber attacks.

NSFOCUS works with Fortune Global 500 companies, including four of the world’s five largest financial institutions, organizations in insurance, retail, healthcare, critical infrastructure industries as well as government agencies. NSFOCUS has technology and channel partners in more than 60 countries, is a member of both the Microsoft Active Protections Program (MAPP), and the Cloud Security Alliance (CSA).

A wholly owned subsidiary of NSFOCUS Technologies Group Co., Ltd., the company has operations in the Americas, Europe, the Middle East and Asia Pacific.