The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-0358

CVE-2022-0358: QEMU virtio-fs Privilege Escalation Flaw

CVE-2022-0358 is a privilege escalation vulnerability in QEMU virtio-fs that allows local users to gain unintended group ownership of files. This article covers the technical details, affected versions, and mitigation.

Published: February 11, 2026

CVE-2022-0358 Overview

A privilege escalation vulnerability was discovered in the QEMU virtio-fs shared file system daemon (virtiofsd) implementation. This flaw is strictly related to CVE-2018-13405 and affects how file ownership is handled when creating files in SGID directories. A local guest user can create files in the directories shared by virtio-fs with unintended group ownership in a scenario where a directory is SGID to a certain group and is writable by a user who is not a member of the group.

Critical Impact

This vulnerability could allow a malicious unprivileged user inside the guest to gain access to resources accessible to the root group, potentially escalating their privileges within the guest. Additionally, a malicious local user on the host might leverage unexpected executable files created by the guest to escalate their privileges on the host system.

Affected Products

  • QEMU (all versions prior to the security patch)
  • Red Hat Enterprise Linux 8.0 Advanced Virtualization

Discovery Timeline

  • 2022-08-29 - CVE-2022-0358 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-0358

Vulnerability Analysis

This vulnerability stems from improper checking of dropped privileges (CWE-273) in the QEMU virtio-fs shared file system daemon. When a directory has the SGID (Set Group ID) bit set, files created within that directory should inherit the group ownership of the parent directory. However, virtiofsd fails to properly handle this scenario when a user who is not a member of the target group creates files in such directories.

The flaw allows unprivileged guest users to create files with unintended group ownership, specifically inheriting root group ownership when exploiting SGID directories. This creates a path for privilege escalation both within the guest environment and potentially on the host system where virtiofsd runs.

Root Cause

The root cause lies in virtiofsd's failure to properly check and enforce privilege restrictions when handling file creation operations in SGID directories. The daemon does not adequately verify that the user creating the file should be allowed to inherit the group ownership specified by the SGID bit, violating the principle of least privilege.

Attack Vector

The attack requires local access to a guest system running virtio-fs. An attacker would:

  1. Identify a directory shared via virtio-fs that has the SGID bit set and is writable
  2. Create files within this directory as an unprivileged user who is not a member of the SGID group
  3. The created files incorrectly inherit the group ownership (potentially root group)
  4. Leverage these files to access resources restricted to the inherited group
  5. If the attacker can create executable files, they may escalate privileges on the host system

The attack mechanism exploits the improper privilege checking during file creation operations. When virtiofsd processes a file creation request in an SGID directory, it fails to properly validate whether the requesting user should be permitted to create files with the inherited group ownership. For detailed technical information, see the QEMU GitLab commit that addresses this issue.

Detection Methods for CVE-2022-0358

Indicators of Compromise

  • Files in virtio-fs shared directories with unexpected group ownership (particularly root group)
  • Newly created executable files in SGID directories created by non-privileged users
  • Unusual file permission patterns in shared filesystem directories
  • Guest processes accessing resources that should be restricted to root group

Detection Strategies

  • Monitor virtio-fs shared directories for files with mismatched group ownership
  • Audit file creation events in SGID directories for ownership anomalies
  • Implement file integrity monitoring on critical shared directories
  • Review guest user activity for attempts to access root-group resources

Monitoring Recommendations

  • Enable comprehensive logging for virtiofsd file operations
  • Set up alerts for file creation events in SGID directories by non-member users
  • Monitor for privilege escalation attempts within guest VMs
  • Track executable file creation in shared filesystem paths

How to Mitigate CVE-2022-0358

Immediate Actions Required

  • Update QEMU to a version containing the security patch (commit 449e8171f96a6a944d1f3b7d3627ae059eae21ca)
  • Apply Red Hat Enterprise Linux security updates for affected virtualization packages
  • Review and restrict SGID directory permissions in virtio-fs shared paths
  • Audit existing files in shared directories for improper group ownership

Patch Information

The vulnerability has been addressed by the QEMU project. The fix is available in the QEMU GitLab commit. Red Hat has also published advisories and patches for affected Enterprise Linux versions. Additional details can be found in the Red Hat Bug Report #2044863 and the Red Hat CVE-2022-0358 Advisory.

Workarounds

  • Remove or avoid using SGID directories in virtio-fs shared paths until patching is complete
  • Restrict write access to shared directories to trusted users only
  • Consider alternative file sharing mechanisms if patching is not immediately possible
  • Implement strict access controls on virtiofsd shared directories
bash
# Configuration example - Remove SGID bit from shared directories as a temporary workaround
# Find and list SGID directories in virtio-fs shared paths
find /path/to/shared/directory -type d -perm -2000 -ls

# Remove SGID bit from specific directories (use with caution)
chmod g-s /path/to/shared/directory

# Alternatively, restrict write permissions on SGID directories
chmod o-w /path/to/shared/sgid-directory

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechQemu

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-273
  • Technical References
  • Red Hat CVE-2022-0358 Advisory

  • NetApp Security Advisory NTAP-20221007-0008
  • Vendor Resources
  • Red Hat Bug Report #2044863

  • QEMU Commit Analysis
  • Related CVEs
  • CVE-2023-2861: QEMU 9pfs Privilege Escalation Flaw

  • CVE-2023-1386: QEMU Privilege Escalation Vulnerability

  • CVE-2026-2243: QEMU VMDK Image DoS Vulnerability

  • CVE-2025-14876: QEMU virtio-crypto DoS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English