CVE-2018-18955 json
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 mish…
published 7y ago modified 4mo ago also EUVD-2018-10659
- cvss
- 7.0
- version 3.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 7.7%
- EPSS 7.7% chance of exploitation in 30 days, percentile 94%
- public exploits
- 7
- Metasploit and Exploit-DB
Summary
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.
Patch / fix
- linux linux_kernel 4.19.2
- linux Debian 14, Debian 13, Debian 12 4.18.20-1
debian advisories DEBIAN-CVE-2018-18955
- linux Ubuntu 18.04 LTS 4.15.0-42.45
- linux-aws Ubuntu 18.04 LTS 4.15.0-1029.30
- linux-gcp Ubuntu 16.04 LTS 4.15.0-1025.26~16.04.1
- linux-gcp Ubuntu 18.04 LTS 4.15.0-1025.26
- linux-hwe Ubuntu 16.04 LTS 4.15.0-42.45~16.04.1
- linux-kvm Ubuntu 18.04 LTS 4.15.0-1027.27
- linux-oem Ubuntu 18.04 LTS 4.15.0-1028.33
- linux-azure Ubuntu 14.04 LTS 4.15.0-1035.36~14.04.2
ubuntu advisories UBUNTU-CVE-2018-18955
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/torvalds/linux@d2f007d commit
- git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d2f007… commit
- exploit-db.com/exploits/45886/ advisory
- cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.19 advisory
- bugs.chromium.org/p/project-zero/issues/detail?id=1712 advisory
- cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.2 advisory
Is CVE-2018-18955 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2018-18955 updated cvss 7.8
kernel: Privilege escalation in map_write() in kernel/user_namespace.c
-
Red Hat Enterprise Linux 5 kernel Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, kernel-alt, python-perf, +9 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise MRG 2 kernel-rt, mrg-rt-release, kernel-rt-trace, kernel-rt-vanilla, kernel-rt-firmwarenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Timeline
- First public exploit (Metasploit exploit/linux/local/nested_namespace_idmap_limit_priv_esc)
- Published
Exploit prediction
7.67% chance of exploitation in the next 30 days, higher than 94% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- Metasploit exploit/linux/local/nested_namespace_idmap_limit_priv_esc Linux Nested User Namespace idmap Limit Local Privilege Escalation metasploit exploit, great rank, 2018-11-15
- EDB-47167 Linux Kernel 4.15.x < 4.19.2 - 'map_write() CAP_SYS_ADMIN' Local Privilege Escalation (polkit Method) local, 2019-01-04
- EDB-47166 Linux Kernel 4.15.x < 4.19.2 - 'map_write() CAP_SYS_ADMIN' Local Privilege Escalation (ldpreload Method) local, 2018-11-21
- EDB-47165 Linux Kernel 4.15.x < 4.19.2 - 'map_write() CAP_SYS_ADMIN' Local Privilege Escalation (dbus Method) local, 2019-01-04
- EDB-47164 Linux Kernel 4.15.x < 4.19.2 - 'map_write() CAP_SYS_ADMIN' Local Privilege Escalation (cron Method) local, 2018-11-21
- EDB-45915 Linux - Nested User Namespace idmap Limit Local Privilege Escalation (Metasploit) local, 2018-11-29
- EDB-45886 Linux - Broken uid/gid Mapping for Nested User Namespaces local, 2018-11-16
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.0 | 7.0 | CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 4.4 | AV:L/AC:M/Au:N/C:P/I:P/A:P |
Classification
- Weakness
-
- CWE-863 Incorrect Authorization
- Technology feeds
References
-
github.com
/torvalds/linux/commit/d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd
patch, vendor-advisory
-
git.kernel.org
/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd
patch, vendor-advisory
-
exploit-db.com
/exploits/45886/
exploit, patch, third-party-advisory, vdb-entry
-
cdn.kernel.org
/pub/linux/kernel/v4.x/ChangeLog-4.18.19
patch, vendor-advisory
-
bugs.chromium.org
/p/project-zero/issues/detail?id=1712
patch, third-party-advisory
-
cdn.kernel.org
/pub/linux/kernel/v4.x/ChangeLog-4.19.2
patch, vendor-advisory
-
exploit-db.com
/exploits/45915/
exploit, third-party-advisory, vdb-entry
-
usn.ubuntu.com
/3836-2/
vendor-advisory, third-party-advisory
-
usn.ubuntu.com
/3835-1/
vendor-advisory, third-party-advisory
-
usn.ubuntu.com
/3833-1/
vendor-advisory, third-party-advisory
-
usn.ubuntu.com
/3832-1/
vendor-advisory, third-party-advisory
-
usn.ubuntu.com
/3836-1/
vendor-advisory, third-party-advisory
-
securityfocus.com
/bid/105941
vdb-entry, third-party-advisory
- support.f5.com /csp/article/K39103040
- security.netapp.com /advisory/ntap-20190416-0003/
Sources
- CVE List CVE-2018-18955
- NVD CVE-2018-18955
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.