The Network Attached Storage (NAS) devices manufacturer giant QNAP published an advisory on 30th March 2023 in which QNAP announced a high-severity sudo privilege escalation vulnerability in QNAP NAS devices. The vulnerability tracked under the identifier CVE-2023-22809 is a High severity vulnerability with a CVSS score of 7.8 out of 10. Security researchers from Synacktiv who disclosed the flaw has punished the comprehensive technical details about the flaw. Since this flaw allows an attacker to carry out privilege escalation attacks just by editing unauthorized files, it is important to fix the CVE-2023-22809 vulnerability. Let’s see how to fix CVE-2023-22809, a high-severity sudo privilege escalation vulnerability in QNAP NAS devices in this post.
When it comes to network-attached storage (NAS), QNAP NAS is a name that needs no introduction. Renowned for its reliability and versatility, QNAP NAS is the perfect choice for both personal and professional use. With a diverse range of models to choose from, QNAP NAS offers options that cater to every need, from basic storage to top-of-the-line solutions.
What sets QNAP NAS apart is its ability to support a wide range of protocols, making it a flexible and efficient storage solution for various use cases. Whether you’re looking to store precious memories at home or seeking robust storage solutions for your business, QNAP NAS has got you covered.
QTS 5.x is the latest cutting-edge operating system from QNAP Systems Inc. designed specifically for their NAS devices. With a user-friendly interface and a vast array of applications, QTS 5.x is the future of data management. Its advanced features, including virtualization, containerization, and disaster recovery, ensure data security and provide a seamless storage experience for all users.
For businesses seeking maximum value from their data, there’s QuTS hero h5.x – a high-performance version of QTS 5.x optimized for the QuTS hero series NAS devices. QuTS hero h5.x combines the best of QTS 5.x with innovative hardware and a unique data management architecture, delivering exceptional performance, reliability, and scalability. Its advanced storage features, including storage pooling, data backup and recovery, and disaster recovery solutions, make it the ultimate choice for businesses that demand the very best in data management solutions.
This is a high-severity sudo privilege escalation vulnerability in QNAP NAS operating systems which got a CVSS score of 7.8 out of 10 on the scale. The vulnerability is not natively rooted in QNAP devices. In fact, the vulnerability is stemmed from the sudo utility, the most powerful, open-source, ubiquitous utility used in all non-windows platforms like Unix, Linux, Solaris, and Mac that allows users to run the programs with another user’s security privileges (superuser privileges).
Synacktiv discovered a sudoers policy bypass in Sudo version 1.9.12p1 when using sudoedit. This vulnerability may lead to privilege escalation by editing unauthorized files.
– Synacktiv
This sudoers policy bypass vulnerability has been discovered in versions 1.8.0 through 1.9.12.p1 of Sudo which could lead to privilege escalation by a local attacker. The vulnerability specifically affects the sudoedit feature, also known as “-e,” which allows users to edit files with elevated privileges. When user-provided environment variables such as SUDO_EDITOR, VISUAL, and EDITOR are passed with additional arguments, Sudo mishandles them, enabling an attacker to append arbitrary entries to the list of files to process.
This security flaw arises because a user-specified editor may contain a “–” argument that can defeat a protection mechanism. For example, a value of “vim — /path/to/extra/file” for the EDITOR variable could bypass the security mechanism, leading to privilege escalation. Visit the report published by Sinacktiv for complete
.
Associated CVE ID | CVE-2023-22809 |
Description | A high-severity sudo privilege escalation vulnerability in QNAP NAS devices |
Associated ZDI ID | – |
CVSS Score | 7.8 High |
Vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Impact Score | 5.9 |
Exploitability Score | 1.8 |
Attack Vector (AV) | Local |
Attack Complexity (AC) | Low |
Privilege Required (PR) | Low |
User Interaction (UI) | None |
Scope | Unchanged |
Confidentiality (C) | High |
Integrity (I) | High |
availability (a) | High |
Since the vulnerability is rooted in sudo versions 1.8.0 through 1.9.12.p1, this flaw affects all the QNAP devices that run the vulnerable sudo versions.
QTS, QuTS hero, QuTScloud, QVP (QVR Pro appliances)
It is crucial for users to upgrade their Sudo installations to version 1.9.12p2 or later to mitigate this vulnerability. Users are also advised to review their Sudo configurations and limit the use of sudoedit where possible.
However, the vendor has released the patch to fix the CVE-2023-22809, a high-severity sudo privilege escalation vulnerability in QNAP NAS devices. Please upgrade your QNAP OS to these fixed versions. We always recommend regular upgrades and keeping your device to the latest version.
QTS 5.0.1.2346 build 20230322 and later
QuTS hero h5.0.1.2348 build 20230324 and later
Synacktiv recommended mitigation for those who can’t go for the immediate patch. According to Synacktiv, adding these affected environment variables to the env_delete deny list when using sudoedit would help mitigate the flaw.
Defaults!SUDOEDIT env_delete+="SUDO_EDITOR VISUAL EDITOR"
Cmnd_Alias SUDOEDIT = sudoedit /etc/custom/service.conf
user ALL=(ALL:ALL) SUDOEDIT
We highly recommend that you regularly update your device to ensure its security and to take advantage of the latest vulnerability fixes. To do so, you can check the product support status to find out about the latest updates available for your specific NAS model.
To update your QTS, QuTS hero, or QuTScloud device, log in as an administrator and navigate to Control Panel > System > Firmware Update. Click on Live Update and then select Check for Update. The system will download and install the latest available update. Alternatively, you can download the update from the QNAP website by visiting Support > Download Center and manually updating your device.
For updating QVP (QVR Pro Appliances), log in as an administrator and navigate to Control Panel > System Settings > Firmware Update. Choose the Firmware Update tab and click on Browse to upload the latest firmware file. You can download the latest firmware file for your device from https://www.qnap.com/go/download. Once the file has been uploaded, click on Update System to install the update.
We hope this post would help you know how to fix CVE-2023-22809, a high-severity sudo privilege escalation vulnerability in QNAP NAS devices. Please share this post and help secure the digital world. Visit our social media page on Facebook, LinkedIn, Twitter, Telegram, Tumblr, Medium & Instagram and subscribe to receive updates like this.
You may also like these articles:
How To Fix The Polkit Privilege Escalation Vulnerability (CVE-2021-4034)
How To Fix CVE-2022-0492- Privilege Escalation And Container Escape Vulnerabilities In Cgroups
How To Fix CVE-2021-44731 (Oh Snap!)- A Privilege Escalation Vulnerability In Snap Package Manager
How To Fix CVE-2019-11043, A PHP Vulnerability In QNAP NAS Devices That Lead To RCE Attack
What Is A Privilege Escalation Attack? How To Prevent Privilege Escalation Attacks?
Arun KL is a cybersecurity professional with 15+ years of experience in IT infrastructure, cloud security, vulnerability management, Penetration Testing, security operations, and incident response. He is adept at designing and implementing robust security solutions to safeguard systems and data. Arun holds multiple industry certifications including CCNA, CCNA Security, RHCE, CEH, and AWS Security.
“Knowledge Arsenal: Empowering Your Security Journey through Continuous Learning”
"Cybersecurity All-in-One For Dummies" offers a comprehensive guide to securing personal and business digital assets from cyber threats, with actionable insights from industry experts.
BurpGPT is a cutting-edge Burp Suite extension that harnesses the power of OpenAI's language models to revolutionize web application security testing. With customizable prompts and advanced AI capabilities, BurpGPT enables security professionals to uncover bespoke vulnerabilities, streamline assessments, and stay ahead of evolving threats.
PentestGPT, developed by Gelei Deng and team, revolutionizes penetration testing by harnessing AI power. Leveraging OpenAI's GPT-4, it automates and streamlines the process, making it efficient and accessible. With advanced features and interactive guidance, PentestGPT empowers testers to identify vulnerabilities effectively, representing a significant leap in cybersecurity.
Tenable BurpGPT is a powerful Burp Suite extension that leverages OpenAI's advanced language models to analyze HTTP traffic and identify potential security risks. By automating vulnerability detection and providing AI-generated insights, BurpGPT dramatically reduces manual testing efforts for security researchers, developers, and pentesters.
Microsoft Security Copilot is a revolutionary AI-powered security solution that empowers cybersecurity professionals to identify and address potential breaches effectively. By harnessing advanced technologies like OpenAI's GPT-4 and Microsoft's extensive threat intelligence, Security Copilot streamlines threat detection and response, enabling defenders to operate at machine speed and scale.