cbcvebase.
CVE-2018-14665
published 2018-10-25

CVE-2018-14665: A flaw was found in xorg-x11-server before 1.20.3. An incorrect permission check for -modulepath and -logfile options when starting Xorg. X server allows…

PriorityP184medium6.6CVSS 3.0
AVPACLPRLUINSUCHIHAH
ITWEXPLOITVulnCheck KEVRansomware
Exploited in the wild
EPSS
27.04%
97.8th percentile
A flaw was found in xorg-x11-server before 1.20.3. An incorrect permission check for -modulepath and -logfile options when starting Xorg. X server allows unprivileged users with the ability to log in to the system via physical console to escalate their privileges and run arbitrary code under root privileges.

Affected

16 ranges
VendorProductVersion rangeFixed in
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
debiandebian_linux
debianxorg-server< xorg-server 2:1.20.3-1 (bookworm)xorg-server 2:1.20.3-1 (bookworm)
redhatenterprise_linux_desktop
redhatenterprise_linux_server
redhatenterprise_linux_server_aus
redhatenterprise_linux_server_eus
redhatenterprise_linux_server_tus
redhatenterprise_linux_workstation
x.orgx_server< 1.20.31.20.3
x.orgxorg-server>= 0 < 2:1.20.3-12:1.20.3-1
x.orgxorg-server>= 0 < 2:1.20.3-12:1.20.3-1
x.orgxorg-server>= 0 < 2:1.20.3-12:1.20.3-1
x.orgxorg-server>= 0 < 2:1.20.3-12:1.20.3-1

Detection & IOCsextracted from sources · hover to see the quote

commandXorg -modulepath ",/tmp" :1
path/tmp/pwned.c
filename/tmp/libglx.so
path/tmp/wow.ksh
path/tmp/passwd.backup
command$xorg $blob -logfile ../etc/passwd :1 > /dev/null 2>&1
path/tmp/wowee.ksh
path/tmp/wow.ksh
  • Detect Xorg launched with -modulepath pointing to /tmp or other world-writable directories, which is the core exploitation technique for this CVE.
  • Detect Xorg launched with -logfile pointing to sensitive system files such as /etc/passwd or paths using directory traversal (e.g., ../etc/passwd), indicating exploitation of the -logfile overwrite vector.
  • Monitor for creation of /tmp/libglx.so, /tmp/pwned.c, /tmp/wow.ksh, /tmp/wowee.ksh, or /tmp/passwd.backup as post-exploitation artifacts associated with known PoC and Metasploit exploit scripts.
  • Alert on gcc being invoked to compile a shared library in /tmp (e.g., gcc -fPIC -shared -nostartfiles), followed by Xorg execution — this matches the -modulepath exploit chain.
  • Detect Xorg processes spawned by non-root, non-display-manager users (i.e., unprivileged shell sessions), especially when the binary has SUID bit set, on versions 1.19.0 through 1.20.2.
  • On AIX targets, watch for the creation and execution of /tmp/wow.ksh using ksh93, followed by /etc/passwd modification — the AIX exploit variant uses -config and -logfile to overwrite /etc/passwd.
  • Detect cron-based payload execution following Xorg launch; the Metasploit module for Linux/OpenBSD/CentOS/RHEL uses cron to execute the payload as root.
  • ·Exploitation requires Xorg to be installed with the SUID bit set. Systems where the SUID bit has been removed (chmod 755) are not exploitable via this CVE.
  • ·On CentOS and RHEL, the default PAM configuration requires console authentication to start the Xorg server, preventing exploitation over SSH sessions.
  • ·The AIX exploit variant replaces the -fp parameter (used in the OpenBSD exploit) with -config combined with ANSI-C quoting via ksh93 to inject newlines into /etc/passwd; ksh93 must be present.
  • ·Successful exploitation via the Metasploit AIX module results in /etc/passwd being overwritten; all currently logged-in users must be included in the overwritten file or AIX will throw errors.
  • ·The vulnerability only affects xorg-x11-server versions 1.19.0 through 1.20.2; version 1.20.3 and later are patched.

CVSS provenance

nvdv3.06.6MEDIUMCVSS:3.0/AV:P/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.2HIGHAV:L/AC:L/Au:N/C:C/I:C/A:C
osv6.6MEDIUM
vulncheck6.6MEDIUM
vendor_debian6.6MEDIUM
vendor_redhat6.6MEDIUM
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.