{"schemaVersion":3,"id":"CVE-2018-18955","aliases":["UBUNTU-CVE-2018-18955","DEBIAN-CVE-2018-18955"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2018-11-16T20:00:00.000Z","modified":"2024-08-05T11:23:08.917Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7,"severity":"high","version":"3.0","versionLabel":"v3.0","source":"NVD","vector":"CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.0","versionLabel":"v3.0","source":"NVD","score":7,"severity":"high","vector":"CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":4.4,"severity":"medium","vector":"AV:L/AC:M/Au:N/C:P/I:P/A:P","exploitability":null,"impact":null,"computed":false},{"version":"3.0","versionLabel":"v3.0","source":"OSV · Ubuntu","score":7,"severity":"high","vector":"CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":2.6,"impact":9.8,"computed":true},{"version":"3.0","versionLabel":"v3.0","source":"OSV · Debian","score":7,"severity":"high","vector":"CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":2.6,"impact":9.8,"computed":true}]},"epss":{"probability":0.07611,"percentile":0.94502,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.07611},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.17303,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.07611,"percentile":0.94502}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.17303,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.07611,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.07611,"percentile":0.94502}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"45886","name":"Linux - Broken uid/gid Mapping for Nested User Namespaces","source":"exploit-database","url":"https://www.exploit-db.com/exploits/45886","maturity":"weaponized","reliabilityScore":0.8,"verified":true,"type":"local","platforms":["linux"],"requiresAuth":null,"exploitdb":{"verified":true,"type":"local","platform":"linux","file":"exploits/linux/local/45886.txt","codes":["CVE-2018-18955"]},"metasploit":null},{"id":"45915","name":"Linux - Nested User Namespace idmap Limit Local Privilege Escalation (Metasploit)","source":"exploit-database","url":"https://www.exploit-db.com/exploits/45915","maturity":"weaponized","reliabilityScore":0.8,"verified":true,"type":"local","platforms":["linux"],"requiresAuth":null,"exploitdb":{"verified":true,"type":"local","platform":"linux","file":"exploits/linux/local/45915.rb","codes":["CVE-2018-18955"]},"metasploit":null},{"id":"47164","name":"Linux Kernel 4.15.x < 4.19.2 - 'map_write() CAP_SYS_ADMIN' Local Privilege Escalation (cron Method)","source":"exploit-database","url":"https://www.exploit-db.com/exploits/47164","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":"local","platforms":["linux"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"local","platform":"linux","file":"exploits/linux/local/47164.sh","codes":["CVE-2018-18955"]},"metasploit":null},{"id":"47165","name":"Linux Kernel 4.15.x < 4.19.2 - 'map_write() CAP_SYS_ADMIN' Local Privilege Escalation (dbus Method)","source":"exploit-database","url":"https://www.exploit-db.com/exploits/47165","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":"local","platforms":["linux"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"local","platform":"linux","file":"exploits/linux/local/47165.sh","codes":["CVE-2018-18955"]},"metasploit":null},{"id":"47166","name":"Linux Kernel 4.15.x < 4.19.2 - 'map_write() CAP_SYS_ADMIN' Local Privilege Escalation (ldpreload Method)","source":"exploit-database","url":"https://www.exploit-db.com/exploits/47166","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":"local","platforms":["linux"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"local","platform":"linux","file":"exploits/linux/local/47166.sh","codes":["CVE-2018-18955"]},"metasploit":null},{"id":"47167","name":"Linux Kernel 4.15.x < 4.19.2 - 'map_write() CAP_SYS_ADMIN' Local Privilege Escalation (polkit Method)","source":"exploit-database","url":"https://www.exploit-db.com/exploits/47167","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":"local","platforms":["linux"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"local","platform":"linux","file":"exploits/linux/local/47167.sh","codes":["CVE-2018-18955"]},"metasploit":null},{"id":"MSF_EXPLOIT_LINUX_LOCAL_NESTED_NAMESPACE_IDMAP_LIMIT_PRIV_ESC","name":"Linux Nested User Namespace idmap Limit Local Privilege Escalation","source":"metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploit/linux/local/nested_namespace_idmap_limit_priv_esc.rb","maturity":"weaponized","reliabilityScore":0.8333333333333334,"verified":true,"type":"remote","platforms":[],"requiresAuth":false,"exploitdb":null,"metasploit":{"fullname":"exploit/linux/local/nested_namespace_idmap_limit_priv_esc","rank":"500","rankName":"great","postAuth":false,"check":true,"stability":["crash-safe"],"sideEffects":["unknown-side-effects"],"reliability":["repeatable-session"]}}],"exploitCount":7,"weaknesses":[{"id":"CWE-863","name":"Incorrect Authorization","description":"The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/863.html"}],"affected":[{"vendor":"canonical","product":"ubuntu_linux","name":"ubuntu linux","label":"ubuntu_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"16.04","noFixRecorded":false,"fixedIn":null},{"text":"18.04","noFixRecorded":false,"fixedIn":null},{"text":"18.10","noFixRecorded":false,"fixedIn":null}],"versionsText":"16.04 | 18.04 | 18.10","eol":{"isEol":true,"eolDate":"2021-04-02T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"16.04","label":"16.04 'Xenial Xerus' (LTS)","eolFrom":"2021-04-02T00:00:00.000Z","isLts":true,"isMaintained":false,"latestVersion":"16.04.7"},"product":{"name":"ubuntu","label":"Ubuntu","category":"os"}},"hubHref":"/vendor/canonical/ubuntu_linux"},{"vendor":"debian","product":"linux","name":"linux","label":"linux","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/linux","purlType":"deb","versions":[{"text":"< 4.18.20-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.18.20-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"linux","name":"linux","label":"linux","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/linux","purlType":"deb","versions":[{"text":"< 4.15.0-42.45","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.15.0-42.45","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"linux-aws","name":"linux-aws","label":"linux-aws","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/linux-aws","purlType":"deb","versions":[{"text":"< 4.15.0-1029.30","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.15.0-1029.30","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"linux-azure","name":"linux-azure","label":"linux-azure","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/linux-azure","purlType":"deb","versions":[{"text":"< 4.15.0-1035.36~14.04.2","noFixRecorded":false,"fixedIn":null},{"text":"< 4.15.0-1035.36~16.04.1","noFixRecorded":false,"fixedIn":null},{"text":"< 4.15.0-1035.36","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.15.0-1035.36~14.04.2 | < 4.15.0-1035.36~16.04.1 | < 4.15.0-1035.36","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"linux-gcp","name":"linux-gcp","label":"linux-gcp","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/linux-gcp","purlType":"deb","versions":[{"text":"< 4.15.0-1025.26~16.04.1","noFixRecorded":false,"fixedIn":null},{"text":"< 4.15.0-1025.26","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.15.0-1025.26~16.04.1 | < 4.15.0-1025.26","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"linux-hwe","name":"linux-hwe","label":"linux-hwe","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/linux-hwe","purlType":"deb","versions":[{"text":"< 4.15.0-42.45~16.04.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.15.0-42.45~16.04.1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"linux-kvm","name":"linux-kvm","label":"linux-kvm","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/linux-kvm","purlType":"deb","versions":[{"text":"< 4.15.0-1027.27","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.15.0-1027.27","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"linux-oem","name":"linux-oem","label":"linux-oem","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/linux-oem","purlType":"deb","versions":[{"text":"< 4.15.0-1028.33","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.15.0-1028.33","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"linux-raspi2","name":"linux-raspi2","label":"linux-raspi2","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/linux-raspi2","purlType":"deb","versions":[{"text":"< 4.15.0-1029.31","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.15.0-1029.31","eol":null,"hubHref":null},{"vendor":"linux","product":"linux_kernel","name":"linux kernel","label":"linux_kernel","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"≥ 4.15, < 4.19.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 4.15, < 4.19.2","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"linux","label":"Linux Kernel","category":"os"}},"hubHref":"/vendor/linux/linux_kernel"}],"affectedCount":11,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://github.com/torvalds/linux/commit/d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd","label":"github.com/torvalds/linux/commit/d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd","hostname":"github.com","tags":["X Refsource MISC","Patch","Vendor Advisory"]},{"url":"https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.19","label":"cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.18.19","hostname":"cdn.kernel.org","tags":["X Refsource MISC","Patch","Vendor Advisory"]},{"url":"https://usn.ubuntu.com/3836-2/","label":"usn.ubuntu.com/3836-2/","hostname":"usn.ubuntu.com","tags":["Vendor Advisory","X Refsource UBUNTU","Third Party Advisory"]},{"url":"https://usn.ubuntu.com/3835-1/","label":"usn.ubuntu.com/3835-1/","hostname":"usn.ubuntu.com","tags":["Vendor Advisory","X Refsource UBUNTU","Third Party Advisory"]},{"url":"https://bugs.chromium.org/p/project-zero/issues/detail?id=1712","label":"bugs.chromium.org/p/project-zero/issues/detail?id=1712","hostname":"bugs.chromium.org","tags":["X Refsource MISC","Patch","Third Party Advisory"]},{"url":"http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd","label":"git.kernel.org/cgit/…","hostname":"git.kernel.org","tags":["X Refsource MISC","Patch","Vendor Advisory"]},{"url":"https://usn.ubuntu.com/3833-1/","label":"usn.ubuntu.com/3833-1/","hostname":"usn.ubuntu.com","tags":["Vendor Advisory","X Refsource UBUNTU","Third Party Advisory"]},{"url":"https://usn.ubuntu.com/3832-1/","label":"usn.ubuntu.com/3832-1/","hostname":"usn.ubuntu.com","tags":["Vendor Advisory","X Refsource UBUNTU","Third Party Advisory"]},{"url":"https://www.exploit-db.com/exploits/45915/","label":"www.exploit-db.com/exploits/45915/","hostname":"www.exploit-db.com","tags":["Exploit","X Refsource EXPLOIT DB","Third Party Advisory","VDB Entry"]},{"url":"https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.2","label":"cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.19.2","hostname":"cdn.kernel.org","tags":["X Refsource MISC","Patch","Vendor Advisory"]},{"url":"https://www.exploit-db.com/exploits/45886/","label":"www.exploit-db.com/exploits/45886/","hostname":"www.exploit-db.com","tags":["Exploit","X Refsource EXPLOIT DB","Patch","Third Party Advisory","VDB Entry"]},{"url":"https://usn.ubuntu.com/3836-1/","label":"usn.ubuntu.com/3836-1/","hostname":"usn.ubuntu.com","tags":["Vendor Advisory","X Refsource UBUNTU","Third Party Advisory"]},{"url":"http://www.securityfocus.com/bid/105941","label":"www.securityfocus.com/bid/105941","hostname":"www.securityfocus.com","tags":["VDB Entry","X Refsource BID","Third Party Advisory"]},{"url":"https://support.f5.com/csp/article/K39103040","label":"support.f5.com/csp/article/K39103040","hostname":"support.f5.com","tags":["X Refsource CONFIRM"]},{"url":"https://security.netapp.com/advisory/ntap-20190416-0003/","label":"security.netapp.com/advisory/ntap-20190416-0003/","hostname":"security.netapp.com","tags":["X Refsource CONFIRM"]},{"url":"https://ubuntu.com/security/CVE-2018-18955","label":"ubuntu.com/security/CVE-2018-18955","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-3832-1","label":"ubuntu.com/security/notices/USN-3832-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/notices/USN-3833-1","label":"ubuntu.com/security/notices/USN-3833-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/notices/USN-3836-1","label":"ubuntu.com/security/notices/USN-3836-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/notices/USN-3835-1","label":"ubuntu.com/security/notices/USN-3835-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/notices/USN-3836-2","label":"ubuntu.com/security/notices/USN-3836-2","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2018-18955","label":"www.cve.org/CVERecord?id=CVE-2018-18955","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2018-18955","label":"security-tracker.debian.org/tracker/CVE-2018-18955","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":["USN-3833-1","USN-3836-1","USN-3836-2"],"duplicates":[],"related":["USN-3833-1","USN-3836-1","USN-3836-2"]},"timeline":[{"kind":"published","date":"2018-11-16T20:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-05T11:23:08.917Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":40,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T05:11:12.504Z","stale":false,"partial":false}}