CVE DatabaseCVE-2023-0386
한국어 권고문 →
CVE-2023-03867.8/HIGHCISA KEVCWE-282

Linux Kernel OverlayFS Local Privilege Escalation Vulnerability (CVE-2023-0386) Analysis and Mitigation Guide

⚡ Jump to Patch
Affected Vendors
linux
Affected Components
linux_kernel
Published Date
2023-03-22
CVSS v3.1
7.8
HIGH
EPSS (30d)
7.9%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Systems and container environments utilizing the Linux kernel OverlayFS subsystem

Impact

A local attacker can escalate privileges to root by copying a setuid/capable file from a nosuid mount into another mount

Mitigation

Apply the latest kernel security patches from your distribution or restrict unprivileged user namespaces as a temporary workaround

Affected Products & Version Scope

Linux kernel versions from v5.11 up to v6.2 utilizing the OverlayFS subsystem (including major distributions like Debian, Ubuntu, and RedHat)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Update your Linux kernel to the latest patched version using your distribution's package manager and reboot the system.

bash
# 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 reboot

2. 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.

bash
# 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 -p

3. Log Audit & IoC Verification Commands

Verify your current kernel version and scan for unauthorized setuid binaries in writable directories.

bash
# 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/null
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR
Due to active exploitation in the wild, immediately apply the official kernel patches and reboot affected hosts.

Block 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.

100% MITRE ATT&CK Detection · 1-Click Rollback

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

Frequently Asked SecOps Questions (CVE-2023-0386)

FAQ

Q1. 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.

SECOPS WORKBENCH INTEGRATION

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.

Generate Report →

🔗 Related Advisories in Similar Stack (linux)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2023-0386 Linux Kernel OverlayFS Local Privilege Escalation Vulnerability (CVE-2023-0386) Analysis and Mitigation Guide (CVSS 7.8) - Patch & Workaround | CVE Pulse