{"uuid": "ad1f3173-3970-48e0-a960-4b7332c1d535", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "9f56dd64-161d-43a6-b9c3-555944290a09", "vulnerability": "CVE-2022-21999", "type": "seen", "source": "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/local/cve_2022_21999_spoolfool_privesc.rb", "content": "{\"actions\": [], \"aliases\": [], \"arch\": \"x64\", \"author\": [\"Oliver Lyak\", \"Shelby Pace\"], \"autofilter_ports\": [], \"autofilter_services\": [], \"check\": true, \"default_credential\": false, \"description\": \"The Windows Print Spooler has a privilege escalation vulnerability that\\n          can be leveraged to achieve code execution as SYSTEM.\\n\\n          The `SpoolDirectory`, a configuration setting that holds the path that\\n          a printer's spooled jobs are sent to, is writable for all users, and it can\\n          be configured via `SetPrinterDataEx()` provided the caller has the\\n          `PRINTER_ACCESS_ADMINISTER` permission. If the `SpoolDirectory` path does not\\n          exist, it will be created once the print spooler reinitializes.\\n\\n          Calling `SetPrinterDataEx()` with the `CopyFiles\\\\` registry key will load the\\n          dll passed in as the `pData` argument, meaning that writing a dll to the `SpoolDirectory`\\n          location can be loaded by the print spooler.\\n\\n          Using a directory junction and UNC path for the `SpoolDirectory`, the exploit\\n          writes a payload to `C:\\\\Windows\\\\System32\\\\spool\\\\drivers\\\\x64\\\\4` and loads it\\n          by calling `SetPrinterDataEx()`, resulting in code execution as SYSTEM.\", \"disclosure_date\": \"2022-02-08\", \"fullname\": \"exploit/windows/local/cve_2022_21999_spoolfool_privesc\", \"is_install_path\": true, \"mod_time\": \"2026-04-22 11:58:46 +0000\", \"name\": \"CVE-2022-21999 SpoolFool Privesc\", \"needs_cleanup\": true, \"notes\": {\"AKA\": [\"SpoolFool\"], \"Reliability\": [\"unreliable-session\"], \"SideEffects\": [\"artifacts-on-disk\"], \"Stability\": [\"crash-service-restarts\"]}, \"path\": \"/modules/exploits/windows/local/cve_2022_21999_spoolfool_privesc.rb\", \"platform\": \"Windows\", \"post_auth\": false, \"rank\": 300, \"ref_name\": \"windows/local/cve_2022_21999_spoolfool_privesc\", \"references\": [\"URL-https://research.ifcr.dk/spoolfool-windows-print-spooler-privilege-escalation-cve-2022-22718-bf7752b68d81\", \"CVE-2022-21999\"], \"rport\": null, \"session_types\": [\"meterpreter\"], \"targets\": [\"Auto\"], \"type\": \"exploit\"}", "creation_timestamp": "2026-09-08T06:52:08.743043Z"}