Security Advisory

CVE-2023-0386: Linux OverlayFS Setuid Copy-Up

Last updated:
  • CVE-2023-0386

CVE-2023-0386 is a privilege-escalation flaw in the Linux kernel's OverlayFS: a uid mapping bug when copying a capable setuid file from a nosuid mount lets a local user gain root. NVD scores it 7.8 and CISA lists it as exploited. Kernels 5.15.91 and 6.1.9 fix it, through mainline commit 4f11ada10d0a.

Vulnerability summary

CVSS base score

7.8

High severity

EPSS score (FIRST)

7.9%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

Yes

Listed as known exploited

Published

Vulnerability ID: CVE-2023-0386 · Source: NVD

Affected components

ComponentCPEVersion range
Linux kernel (OverlayFS, CONFIG_OVERLAY_FS)cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*5.11 to before 5.15.91, 5.16 to before 6.1.9, 6.2-rc1 to 6.2-rc5 (NVD)

What does this mean for affected devices?

CVE-2023-0386 is a privilege-escalation flaw in OverlayFS, the Linux kernel's union filesystem. Red Hat, the CNA, describes unauthorized access to the execution of a setuid file with capabilities "in how a user copies a capable file from a nosuid mount into another mount"; it calls the root cause a uid mapping bug that "allows a local user to escalate their privileges on the system". NVD's Primary score is 7.8, CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, and CISA's ADP container gives the same 7.8. Red Hat and CISA's KEV entry classify it as CWE-282 (Improper Ownership Management); NVD records NVD-CWE-Other (NVD, CVE record).

Which kernel versions are affected?

NVD's CPE data covers Linux 5.11 to before 5.15.91, 5.16 to before 6.1.9, and 6.2-rc1 through 6.2-rc5. The fix is mainline commit 4f11ada10d0a, "ovl: fail on invalid uid/gid mapping at copy up", committed 2023-01-27. It makes copy-up fail when a file's owner has no mapping in the mounter's user namespace, names commit 459c7c565ac3 ("ovl: unprivieged mounts") as the origin, and is tagged for stable kernels from 5.11. It changes only fs/overlayfs/copy_up.c.

Which devices are affected?

Embedded Linux and appliance firmware on a 5.11 to 6.1 kernel older than the fixed releases, where OverlayFS is built in and local code can create user namespaces. The kernel's overlayfs Makefile builds the filesystem only under obj-$(CONFIG_OVERLAY_FS), so a kernel without CONFIG_OVERLAY_FS does not contain the flaw. Products that use OverlayFS to layer a writable partition over a read-only root filesystem, or to run containers, should treat this as relevant. CVE-2021-3493 is an earlier KEV-listed OverlayFS capability flaw, specific to Ubuntu kernels. Our Linux kernel CVE triage guide shows how to record a CONFIG_* check as evidence.

How do you fix CVE-2023-0386?

Update the kernel to at least 5.15.91 or 6.1.9, or to the latest release of its stable branch, or backport commit 4f11ada10d0a into the vendor kernel. If the product does not use OverlayFS, build without CONFIG_OVERLAY_FS. Keep untrusted code off devices that cannot be updated.

Is CVE-2023-0386 exploited?

Yes. CISA added it to the KEV catalog on 2025-06-17 with a due date of 2025-07-08 and the required action "Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable"; known ransomware campaign use is listed as Unknown, as of 2026-11-25 (catalog version 2026.11.24). FIRST EPSS gives it 0.07880, the 94.8th percentile, in the 2026-11-24 dataset (CISA KEV, FIRST EPSS). The KEV and EPSS prioritization guide explains how to rank a KEV entry with a modest EPSS score.

How to fix this class of issueNo dedicated SoftWSP guide covers this weakness class; the fix is usually the vendor patch or firmware update referenced above. Our related guide explains how to plan and verify it: NIST SP 800-40 Rev. 4: enterprise patch management planning, explained.

Evidence

  • NVD: status Analyzed; [email protected] Primary CVSS 3.1 7.8 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H; CISA-ADP Secondary 7.8; CWE-282 (Red Hat Secondary), NVD-CWE-Other (nvd Secondary); CPE linux_kernel 5.11-5.15.91, 5.16-6.1.9, 6.2 rc1-rc5; published 2023-03-22; read 2026-11-25. — NVD
  • CVE record (CNA redhat, PUBLISHED 2023-03-22): description quoted; affected 'Linux kernel 6.2-rc6'; CWE-282; CISA ADP 7.8. — CVE.org
  • Mainline commit 4f11ada10d0a 'ovl: fail on invalid uid/gid mapping at copy up', committed 2023-01-27; Fixes: 459c7c565ac3 ('ovl: unprivieged mounts'); Cc stable # v5.11; changes fs/overlayfs/copy_up.c. — Linux kernel git
  • fs/overlayfs/Makefile: obj-$(CONFIG_OVERLAY_FS) += overlay.o. — Linux kernel source
  • CISA KEV catalog version 2026.11.24: Linux Kernel Improper Ownership Management Vulnerability, dateAdded 2025-06-17, dueDate 2025-07-08, knownRansomwareCampaignUse Unknown, CWE-282; required action quoted; checked 2026-11-25. — CISA KEV
  • EPSS 0.07880, percentile 0.94788, dataset 2026-11-24, read 2026-11-25. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. CVE.org record CVE-2023-0386 (CNA: Red Hat)
  3. Linux kernel mainline fix commit 4f11ada10d0a
  4. Linux kernel source: fs/overlayfs/Makefile
  5. CISA KEV
  6. FIRST EPSS

Frequently asked questions

Which kernel versions fix CVE-2023-0386?

5.15.91 on the 5.15 branch and 6.1.9 on the 6.1 branch; NVD lists 5.11 to before 5.15.91, 5.16 to before 6.1.9 and 6.2-rc1 to rc5 as affected. The mainline fix is commit 4f11ada10d0a (per NVD and the fix commit).

Is my firmware affected if it does not use OverlayFS?

Not if the kernel is built without CONFIG_OVERLAY_FS. The fix changes only fs/overlayfs/copy_up.c, and the overlayfs Makefile builds that code only when the option is set (per the fix commit and fs/overlayfs/Makefile).

Are kernels older than 5.11 affected by CVE-2023-0386?

NVD's CPE data starts the affected range at 5.11, and the fix commit names 459c7c565ac3 ("ovl: unprivieged mounts") as the origin of the bug and is tagged for stable kernels from v5.11 (per NVD and the fix commit).

Is CVE-2023-0386 exploited?

Yes. CISA added it to the KEV catalog on 2025-06-17 with a due date of 2025-07-08; ransomware use is listed as Unknown, as of 2026-11-25 (catalog version 2026.11.24, per CISA KEV).