Description
In glibc 2.26 and earlier there is confusion in the usage of getcwd() by realpath() which can be used to write before the destination buffer leading to a buffer underflow and potential code execution.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | glibc | 2.26-4 | — |
| Debian 13 | glibc | 2.26-4 | — |
| Debian 12 | glibc | 2.26-4 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | glibc | 2.23-0ubuntu10 | USN-3534-1 |
| Ubuntu 14.04 LTS | eglibc | 2.19-0ubuntu6.14 | USN-3534-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | musl | 1.1.9-1ubuntu0.1~esm2 | USN-4768-1 |
| Ubuntu Pro 14.04 LTS | musl | 0.9.15-1ubuntu0.1~esm1 | USN-4768-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 7 | nscd +7 | 2.17-222.el7 | RHSA-2018:0805 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP3 | glibc | 2.22-62.3.4 | SUSE-SU-2018:0451-1, SUSE-SU-2018:0074-1 |
| SLES 12 SP2 | glibc | 2.22-62.3.4 | SUSE-SU-2018:0451-1, SUSE-SU-2018:0074-1 |
| SLES 12 SP1 | glibc | 2.19-40.9.5 | SUSE-SU-2018:0071-1 |
| SLES 12 | glibc | 2.19-22.24.5 | SUSE-SU-2018:2187-1, SUSE-SU-2018:0076-1 |
| SLES 11 SP4 | glibc | 2.11.3-17.110.3.1 | SUSE-SU-2018:0565-1, SUSE-SU-2018:0075-1 |
Show 7 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 11 SP3 | glibc | 2.11.3-17.110.3.1 | SUSE-SU-2018:0565-1, SUSE-SU-2018:0075-1 |
| SLES for SAP 12 SP3 | glibc | 2.22-62.3.4 | SUSE-SU-2018:0451-1, SUSE-SU-2018:0074-1 |
| SLES for SAP 12 SP2 | glibc | 2.22-62.3.4 | SUSE-SU-2018:0451-1, SUSE-SU-2018:0074-1 |
| SLES for SAP 12 SP1 | glibc | 2.19-40.9.5 | SUSE-SU-2018:0071-1 |
| SLES for SAP 11 SP4 | glibc | 2.11.3-17.110.3.1 | SUSE-SU-2018:0565-1, SUSE-SU-2018:0075-1 |
| SUSE OpenStack Cloud 6 | glibc | 2.19-40.9.5 | SUSE-SU-2018:0071-1 |
| SUSE Linux Enterprise Point of Sale 11 SP3 | glibc | 2.11.3-17.110.3.1 | SUSE-SU-2018:0565-1, SUSE-SU-2018:0075-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | glibc | 2.34-1.2 | openSUSE-SU-2024:10792-1 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 7 | nscd +6 | 2.17-222.el7 | ELSA-2018-0805 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
glibc 'realpath()' Privilege Escalation
exploit/linux/local/glibc_realpath_priv_esc
Exploit-DB 2
- glibc - 'realpath()' Privilege Escalation (Metasploit) EDB-44889 · local · Jun 13, 2018 · verified
- glibc < 2.26 - 'getcwd()' Local Privilege Escalation EDB-43775 · local · Jan 16, 2018 · verified
GitHub 2 repositories
-
0x00-0x00/CVE-2018-1000001 ★ 31 · Feb 7, 2018
glibc getcwd() local privilege escalation compiled binaries
-
usernameid0/tools-for-CVE-2018-1000001 ★ 0 · Mar 1, 2022
Tools for get offsets and adding patch for support i386
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 12
- USN-4768-1 musl vulnerabilities Ubuntu Security Notices (USN) · Jun 29, 2026
- RHSA-2018:0805 Red Hat Security Advisory: glibc security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- USN-3534-1 eglibc, glibc vulnerabilities Ubuntu Security Notices (USN) · Apr 22, 2026
- SUSE-SU-2018:0075-1 Security update for glibc SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10792-1 glibc-2.34-1.2 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:0451-1 Security update for glibc SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:2187-1 Security update for glibc SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:0071-1 Security update for glibc SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:0565-1 Security update for glibc SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:0074-1 Security update for glibc SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:0076-1 Security update for glibc SUSE / openSUSE Security Updates · Feb 4, 2026
- ELSA-2018-0805 Moderate: glibc security, bug fix, and enhancement update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Apr 16, 2018
References
- [oss-security] 20180111 Libc Realpath Buffer Underflow CVE-2018-1000001 mailing-list
- USN-3534-1 vendor-advisory
- https://www.halfdog.net/Security/2017/LibcRealpathBufferUnderflow/
- 102525 vdb-entry
- 44889 exploit
- 43775 exploit
- USN-3536-1 vendor-advisory
- RHSA-2018:0805 vendor-advisory
- 1040162 vdb-entry
- https://security.netapp.com/advisory/ntap-20190404-0003/