CVE-2018-18955

HIGH

Linux Nested User Namespace idmap Limit Local Privilege Escalation

Title source: metasploit

Description

In the Linux kernel 4.15.x through 4.19.x before 4.19.2, map_write() in kernel/user_namespace.c allows privilege escalation because it mishandles nested user namespaces with more than 5 UID or GID ranges. A user who has CAP_SYS_ADMIN in an affected user namespace can bypass access controls on resources outside the namespace, as demonstrated by reading /etc/shadow. This occurs because an ID transformation takes place properly for the namespaced-to-kernel direction but not for the kernel-to-namespaced direction.

Exploits (9)

exploitdb WORKING POC VERIFIED
by Metasploit · rubylocallinux
https://www.exploit-db.com/exploits/45915
exploitdb WORKING POC VERIFIED
by Google Security Research · textlocallinux
https://www.exploit-db.com/exploits/45886
exploitdb WORKING POC
by bcoles · bashlocallinux
https://www.exploit-db.com/exploits/47167
exploitdb WORKING POC
by bcoles · bashlocallinux
https://www.exploit-db.com/exploits/47165
exploitdb WORKING POC
by bcoles · bashlocallinux
https://www.exploit-db.com/exploits/47166
exploitdb WORKING POC
by bcoles · bashlocallinux
https://www.exploit-db.com/exploits/47164
nomisec WORKING POC 21 stars
by scheatkode · poc
https://github.com/scheatkode/CVE-2018-18955
metasploit WORKING POC GREAT
by Jann Horn, bcoles · rubypoc
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/nested_namespace_idmap_limit_priv_esc.rb

Scores

CVSS v3 7.0
EPSS 0.0957
EPSS Percentile 92.9%
Attack Vector LOCAL
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Details

CWE
CWE-863
Status published
Products (4)
canonical/ubuntu_linux 16.04
canonical/ubuntu_linux 18.04
canonical/ubuntu_linux 18.10
linux/linux_kernel 4.15 - 4.19.2
Published Nov 16, 2018
Tracked Since Feb 18, 2026