Linux Kernel OverlayFS Local Privilege Escalation Vulnerability (CVE-2023-0386) Analysis and Mitigation Guide
Executive & SecOps Summary
SECOPS ASSESSMENTSystems and container environments utilizing the Linux kernel OverlayFS subsystem
A local attacker can escalate privileges to root by copying a setuid/capable file from a nosuid mount into another mount
Apply the latest kernel security patches from your distribution or restrict unprivileged user namespaces as a temporary workaround
Affected Products & Version Scope
Remediation & Live Workaround Commands
PATCH & WORKAROUND1. Official Patch & Version Upgrade Commands
Update your Linux kernel to the latest patched version using your distribution's package manager and reboot the system.
# For Debian/Ubuntu-based systems
sudo apt-get update
sudo apt-get install --only-upgrade linux-image-generic -y
sudo reboot
# For RHEL/CentOS/Rocky Linux-based systems
sudo dnf update kernel -y
sudo reboot2. Temporary Workaround & Hardening Configuration
If patching and rebooting cannot be performed immediately, mitigate the risk by disabling unprivileged user namespaces to break the exploit chain.
# Temporarily disable unprivileged user namespaces
sudo sysctl -w kernel.unprivileged_userns_clone=0
# Persist the configuration across reboots
echo 'kernel.unprivileged_userns_clone=0' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p3. Log Audit & IoC Verification Commands
Verify your current kernel version and scan for unauthorized setuid binaries in writable directories.
# Check the active kernel version
uname -r
# Scan for suspicious root-owned setuid files in temporary directories
find /tmp /var/tmp -perm -4000 -type f -user root 2>/dev/nullBlock Kernel Privilege Escalation & Ransomware Payloads Before You Can Reboot
Protect unpatched Windows, Linux, and macOS workloads against in-memory exploitation and lateral movement with autonomous EDR.
Technical Root Cause & Exploitation Mechanics
1. Vulnerability Overview & Root Cause
This vulnerability (CVE-2023-0386) is a local privilege escalation (LPE) flaw residing in the Linux kernel's OverlayFS subsystem. The root cause lies in how OverlayFS handles the copy-up process of a file with special capabilities or setuid permissions from a mount point configured with the nosuid option into another mount. Due to inadequate validation of UID mappings and execution permissions during this copy-up operation, the kernel fails to enforce the nosuid restriction, allowing unauthorized privilege transition.
2. Exploitation Mechanics & Attack Scenario
An attacker with local access leverages unprivileged user namespaces to mount a crafted filesystem with the nosuid option. Inside this mount, the attacker creates a binary owned by root with the setuid bit enabled. Normally, executing this binary from a nosuid mount prevents privilege escalation. However, by mounting an OverlayFS instance where this directory acts as the lower directory (lowerdir) and another directory acts as the upper directory (upperdir), the attacker can trigger a copy-up operation by writing to the file. OverlayFS copies the file to the upper directory without preserving the nosuid restriction, resulting in a fully functional root-owned setuid binary on the host filesystem, which the attacker executes to gain root privileges.
3. Infrastructure & Business Impact
With a CVSS score of 7.8 (High) and active exploitation documented in CISA's Known Exploited Vulnerabilities (KEV) catalog, this vulnerability poses a severe threat. It is particularly critical in multi-tenant environments, shared hosting, and containerized infrastructures (Docker/Kubernetes). A successful exploit allows an attacker who has compromised a container or obtained low-privilege shell access to escape isolation boundaries, compromise the host operating system, and gain full administrative control.
Official Vendor Advisories & References
A flaw was found in the Linux kernel, where unauthorized access to the execution of the setuid file with capabilities was found in the Linux kernel’s OverlayFS subsystem in how a user copies a capable file from a nosuid mount into another mount. This uid mapping bug allows a local user to escalate their privileges on the system.
Frequently Asked SecOps Questions (CVE-2023-0386)
FAQQ1. How critical is CVE-2023-0386 and is it actively exploited in the wild?
CVE-2023-0386 is rated CVSS 7.8 (HIGH) with a 30-day EPSS exploitation probability of 7.9%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.
Q2. Which vendors and products are affected by CVE-2023-0386?
Primary impacted vendors include linux across linux_kernel. Scope summary: Linux kernel versions from v5.11 up to v6.2 utilizing the OverlayFS subsystem (including major distributions like Debian, Ubuntu, and RedHat)
Q3. What temporary mitigations or workarounds exist for CVE-2023-0386 before patching?
[Mitigation] Apply the latest kernel security patches from your distribution or restrict unprivileged user namespaces as a temporary workaround Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.
Generate an Internal Engineering Notice or CISO Report for CVE-2023-0386
Instantly format this advisory into an executive CISO summary or engineering patch ticket.
🔗 Related Advisories in Similar Stack (linux)
View Category →Linux Kernel IPv6 Socket Memory Corruption Vulnerability (CVE-2026-53362) Analysis and Mitigation Guide
[Affected Scope] Linux kernel systems utilizing UDPv6 sockets with MSG_MORE and MSG_SPLICE_PAGES flags
Linux Kernel algif_aead In-place Operation Vulnerability Leading to Local Privilege Escalation (CVE-2026-31431)
[Affected Scope] Systems running Linux kernel with the `algif_aead` crypto subsystem module enabled.
Linux Kernel Netfilter Bridge ebt_snat ARP Rewrite Vulnerability (CVE-2026-53266)
[Affected Scope] Linux systems utilizing ebtables SNAT targets within bridge netfilter configurations.
Linux Kernel Memory Corruption via Missing Shared-Frag Marker in skbuff (CVE-2026-46300)
[Affected Scope] Linux kernel network stack (skbuff) and systems utilizing IPsec (ESP).
Subscribe to Daily Vulnerability Briefings & KEV Alerts
Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.