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-2021-41089

CVE-2021-41089: Moby Docker Engine Privilege Escalation

CVE-2021-41089 is a privilege escalation vulnerability in Moby Docker Engine that allows Unix file permission changes on the host filesystem through docker cp commands. This article covers technical details, affected versions, impact, and mitigation.

Published: February 25, 2026

CVE-2021-41089 Overview

A file permission vulnerability was discovered in Moby (Docker Engine), the open-source project created by Docker to enable software containerization. The bug affects the docker cp command, where attempting to copy files into a specially-crafted container can result in Unix file permission changes for existing files on the host's filesystem, widening access to others.

Critical Impact

This vulnerability allows attackers to modify file permissions on the host filesystem through a crafted container, potentially enabling unauthorized access when combined with a cooperating process.

Affected Products

  • Moby (Docker Engine) versions prior to 20.10.9
  • Fedora 34
  • Fedora 35

Discovery Timeline

  • 2021-10-04 - CVE-2021-41089 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-41089

Vulnerability Analysis

This vulnerability is classified under CWE-281 (Improper Preservation of Permissions), which occurs when software fails to properly maintain the correct access permissions during file operations. The flaw manifests in how the docker cp command handles file copying operations when targeting specially-crafted containers.

When docker cp is executed, the underlying archive extraction mechanism creates directories with improper permission handling. Specifically, the issue lies in the pkg/chrootarchive/archive.go file where directory creation occurs outside the expected chroot context. This allows an attacker with the ability to create containers and trigger docker cp operations to manipulate file permissions on the host system.

While this bug does not directly allow files to be read, modified, or executed, it creates a permission widening condition that could be leveraged by an additional cooperating process to gain unauthorized access to sensitive files.

Root Cause

The root cause lies in improper handling of directory creation during the archive extraction process. The original code created directories with ID mapping operations regardless of whether the destination was inside or outside the chroot environment. This lack of distinction allowed permission changes to propagate to the host filesystem when copying files to a root destination.

Attack Vector

The attack requires local access to a system running Docker Engine. An attacker would need to:

  1. Create a specially-crafted container designed to exploit the permission handling flaw
  2. Trigger a docker cp operation targeting the crafted container
  3. Utilize a cooperating process to exploit the widened file permissions on the host

The local attack vector combined with the requirement for an additional cooperating process limits the exploitability, though the potential for privilege escalation in containerized environments makes this a significant security concern.

go
// Security patch in pkg/chrootarchive/archive.go
// Source: https://github.com/moby/moby/commit/bce32e5c93be4caf1a592582155b9cb837fc129a

 	options.ExcludePatterns = []string{}
 }

-	idMapping := idtools.NewIDMappingsFromMaps(options.UIDMaps, options.GIDMaps)
-	rootIDs := idMapping.RootPair()
+	// If dest is inside a root then directory is created within chroot by extractor.
+	// This case is only currently used by cp.
+	if dest == root {
+		idMapping := idtools.NewIDMappingsFromMaps(options.UIDMaps, options.GIDMaps)
+		rootIDs := idMapping.RootPair()

-	dest = filepath.Clean(dest)
-	if _, err := os.Stat(dest); os.IsNotExist(err) {
-		if err := idtools.MkdirAllAndChownNew(dest, 0755, rootIDs); err != nil {
-			return err
+		dest = filepath.Clean(dest)
+		if _, err := os.Stat(dest); os.IsNotExist(err) {
+			if err := idtools.MkdirAllAndChownNew(dest, 0755, rootIDs); err != nil {
+				return err
+			}
 		}
 	}

Source: GitHub Commit Details

Detection Methods for CVE-2021-41089

Indicators of Compromise

  • Unexpected file permission changes on host filesystem files or directories
  • Anomalous docker cp commands targeting unusual container paths
  • Presence of specially-crafted containers with suspicious directory structures

Detection Strategies

  • Monitor docker cp command usage and audit all file copy operations between host and containers
  • Implement file integrity monitoring (FIM) on critical host directories to detect permission changes
  • Review Docker audit logs for unusual container creation patterns or copy operations
  • Deploy container security tools that can detect permission escalation attempts

Monitoring Recommendations

  • Enable Docker daemon audit logging and forward logs to a SIEM for analysis
  • Set up alerts for permission changes on sensitive host directories
  • Monitor for containers with root-level access to host filesystem paths
  • Implement runtime container security scanning to detect exploitation attempts

How to Mitigate CVE-2021-41089

Immediate Actions Required

  • Update Moby (Docker Engine) to version 20.10.9 or later immediately
  • Audit recent docker cp operations for potential exploitation
  • Review file permissions on critical host directories for unexpected changes
  • Restrict access to the Docker daemon to trusted users only

Patch Information

The vulnerability has been fixed in Moby (Docker Engine) version 20.10.9. The patch modifies the archive extraction logic in pkg/chrootarchive/archive.go to ensure directory creation with ID mapping only occurs when the destination is the same as the root, limiting the scope of permission changes to within the chroot environment.

Users should update to version 20.10.9 or later as soon as possible. Running containers do not need to be restarted after the update. For Fedora users, updated packages are available through the standard package repositories.

Additional security advisories and patch details are available from:

  • GitHub Security Advisory
  • Siemens Security Advisory

Workarounds

  • Restrict docker cp usage to trusted administrators only until the patch is applied
  • Implement strict access controls on the Docker daemon socket
  • Use read-only container filesystems where possible to limit potential attack surface
  • Consider implementing AppArmor or SELinux profiles to restrict Docker operations
bash
# Configuration example
# Verify Docker Engine version after update
docker version --format '{{.Server.Version}}'

# Restrict Docker socket access to authorized users
sudo chmod 660 /var/run/docker.sock
sudo chown root:docker /var/run/docker.sock

# Audit docker cp operations (add to Docker daemon audit rules)
# Add to /etc/audit/rules.d/docker.rules
-a always,exit -F path=/usr/bin/docker -F perm=x -k docker_commands

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechMoby

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-281
  • Technical References
  • Siemens Security Advisory

  • GitHub Security Advisory

  • Fedora Package Announcement

  • Fedora Package Announcement
  • Vendor Resources
  • GitHub Commit Details
  • Related CVEs
  • CVE-2026-33997: Moby Privilege Escalation Vulnerability

  • CVE-2022-24769: Moby Privilege Escalation Vulnerability

  • CVE-2026-34040: Moby Authorization Bypass Vulnerability

  • CVE-2024-29018: Moby Information Disclosure 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