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-3328

CVE-2022-3328: Canonical Snapd Race Condition Flaw

CVE-2022-3328 is a race condition flaw in Canonical Snapd's snap-confine component that could allow privilege escalation. This article covers the technical details, affected versions, security impact, and mitigation.

Published: February 17, 2026

CVE-2022-3328 Overview

CVE-2022-3328 is a race condition vulnerability in Canonical's snap-confine utility, specifically within the must_mkdir_and_open_with_perms() function. This vulnerability affects the snapd package, which is a core component of Ubuntu systems responsible for managing and confining snap applications. The race condition occurs during directory creation and permission setting operations, potentially allowing local attackers to exploit the timing window between these operations.

Critical Impact

A local attacker with low privileges can exploit this race condition to achieve high impact on confidentiality, integrity, and availability of the affected system, potentially leading to privilege escalation.

Affected Products

  • Canonical Snapd (all vulnerable versions)
  • Ubuntu Linux 16.04 ESM
  • Ubuntu Linux 18.04 ESM
  • Ubuntu Linux 20.04 LTS
  • Ubuntu Linux 22.04 LTS
  • Ubuntu Linux 22.10

Discovery Timeline

  • 2024-01-08 - CVE-2022-3328 published to NVD
  • 2025-06-03 - Last updated in NVD database

Technical Details for CVE-2022-3328

Vulnerability Analysis

This vulnerability is classified as CWE-362 (Race Condition), a Time-of-Check Time-of-Use (TOCTOU) type flaw in the snap-confine component. The snap-confine utility is a setuid-root program that sets up the execution environment for snap applications. The vulnerable function must_mkdir_and_open_with_perms() is responsible for creating directories with specific permissions during the snap confinement process.

The race condition exists because there is a gap between when the directory is created and when its permissions are properly set. During this window, an attacker with local access could potentially manipulate the directory or its contents, leveraging the elevated privileges of the setuid-root snap-confine binary.

Root Cause

The root cause lies in the non-atomic nature of the directory creation and permission-setting operations within must_mkdir_and_open_with_perms(). When this function creates a directory and subsequently sets its permissions, there exists a brief window where the directory exists but doesn't have the intended security permissions applied. This TOCTOU vulnerability allows an attacker to race against the permission-setting operation, potentially inserting malicious content or symbolic links before permissions are properly enforced.

Attack Vector

The attack requires local access to the system with low-privilege user credentials. An attacker would need to:

  1. Monitor or predict when snap-confine operations occur that invoke the vulnerable function
  2. Exploit the timing window between directory creation and permission setting
  3. Manipulate the filesystem state during this window (e.g., through symbolic link attacks or directory substitution)
  4. Leverage the setuid-root nature of snap-confine to escalate privileges or achieve unauthorized access

The vulnerability mechanism targets the race condition in directory operations. During normal snap-confine execution, the must_mkdir_and_open_with_perms() function creates directories as part of setting up the snap execution environment. The attacker exploits the timing gap by rapidly creating symbolic links or manipulating directory entries in the brief window between the mkdir system call and the subsequent permission-setting operations. Due to the setuid-root privileges of snap-confine, successful exploitation can result in operations being performed with root privileges on attacker-controlled paths.

Detection Methods for CVE-2022-3328

Indicators of Compromise

  • Unusual snap-confine process activity or crashes indicating potential exploitation attempts
  • Suspicious symbolic links in snap-related directories such as /var/snap/ or /tmp/
  • Unexpected file permission changes in snap confinement paths
  • Evidence of rapid filesystem operations targeting snap directories during snap execution

Detection Strategies

  • Monitor for anomalous snap-confine process behavior using process monitoring tools
  • Implement file integrity monitoring on critical snap-related directories
  • Deploy auditd rules to track mkdir, chmod, and chown operations in snap paths
  • Use SentinelOne's behavioral AI to detect privilege escalation attempts following snap operations

Monitoring Recommendations

  • Enable audit logging for setuid program executions, particularly snap-confine
  • Monitor for rapid successive filesystem operations that could indicate race condition exploitation
  • Track symbolic link creation in /tmp/ and snap-related directories
  • Implement real-time alerting for privilege escalation patterns on Ubuntu systems

How to Mitigate CVE-2022-3328

Immediate Actions Required

  • Update snapd to the latest patched version immediately
  • Review system logs for any suspicious snap-confine activity
  • Restrict local user access on critical systems until patches are applied
  • Monitor for unusual privilege escalation patterns on affected Ubuntu systems

Patch Information

Canonical has released security updates to address this vulnerability. The patch information is available through Ubuntu Security Notice USN-5753-1. System administrators should apply the security updates using the standard package management tools:

For Ubuntu systems, run:

bash
sudo apt update && sudo apt upgrade snapd

Verify the installed snapd version is patched by checking:

bash
snap version

Workarounds

  • Limit local user access to trusted accounts only until patching is complete
  • Monitor snap-confine execution closely using process monitoring tools
  • Consider temporarily disabling snap functionality on highly sensitive systems if feasible
  • Implement additional access controls on snap-related directories
bash
# Configuration example
# Enable audit logging for snap-confine operations
sudo auditctl -w /usr/lib/snapd/snap-confine -p x -k snap_confine_exec

# Monitor directory operations in snap paths
sudo auditctl -w /var/snap -p wa -k snap_dir_changes

# Verify snapd version after patching
snap version

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

  • Vulnerability Details
  • TypeRace Condition

  • Vendor/TechCanonical

  • SeverityHIGH

  • CVSS Score7.0

  • EPSS Probability0.10%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-362
  • Technical References
  • CVE-2022-3328 Details
  • Vendor Resources
  • Ubuntu Security Notice USN-5753-1
  • Related CVEs
  • CVE-2025-5054: Canonical Apport Race Condition Vulnerability

  • CVE-2023-1523: Canonical Snapd RCE Vulnerability

  • CVE-2023-1326: Canonical Apport Privilege Escalation Flaw
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